Comments (7)
Just an update: the Papertrail tutorial I've linked also mentions winston.transports.Http
; this throws fewer errors, but still fails, as there's a dependency on fs
:
$ wrangler publish
๐ ./node_modules/winston/dist/winston/tail-file.js
Module not found: Error: Can't resolve 'fs' in '/path/to/project/node_modules/winston/dist/winston'
from winston-syslog.
In short, be sure to run npm install
before your publish line, and if you figure out more please feel free to post here and/or make a PR on the documentation. However, it looks like the issue is in the unix-dgram package, not in winston.
from winston-syslog.
The Workers runtime uses the V8 engine and also implements many of the standard APIs available in most modern browsers. I'm not sure there's a way to make winston work. Do you see a way around dgram
in one of the provided APIs?
from winston-syslog.
I'm saying it looks like the problem is in the unix-dgram package rather than in Winston.
from winston-syslog.
I got that thanks, you wrote it twice. Do you know or have an idea how to make winston-syslog compatible with cloudworkers or not?
from winston-syslog.
I donโt think you want to use the winston-syslog transport. If you are trying to send logs to some remote destination, you should use something like the built-in HTTP transport in Winston. The syslog transport is meant for writing things to Linux system logs, and I donโt think that Cloudflare workers give you access to such logs since they are not designed as full-fledged Linux VMs. Hope that helps steer you in the right direction.
from winston-syslog.
There should be some polyfill for the fs module out there you can use. Or even better, see if you can trick Node into using the browser version of Winston (https://github.com/winstonjs/winston/blob/master/package.json#L59), which is designed to not rely on serverside modules like fs.
from winston-syslog.
Related Issues (20)
- Winston-syslog doesn't handle connection loss? HOT 5
- Support critical as loglevel
- mTLS connection is not working
- Syslog logs not flushed until app exits, and multiples are concatenated? HOT 6
- Logging via UNIX domains sockets is not quite conformant
- App doesn't stop when I use this library HOT 4
- Timestamp is incorrect when milliseconds < 100
- Usage: please correct "type" options HOT 1
- InFlight counter going negative
- Error healthCheck(dgram)
- Occasional ECONNRESET and EPIPE errors HOT 1
- No logs when running in docker container HOT 1
- Unable to change Destination via Syslog Configuration HOT 1
- winston-syslog hardcodes log level to 'info' HOT 1
- Unable to change appName without reinstantiation HOT 1
- Error Handling on Creating TCP Socket HOT 1
- Winston containers problem with winston-syslog and solution HOT 2
- Implementing in nuxt 3
- Dependency glossy is unmaintained HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winston-syslog.