-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloudflare workers support #179
Comments
In short, be sure to run |
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 |
I'm saying it looks like the problem is in the unix-dgram package rather than in Winston. |
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? |
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. |
Just an update: the Papertrail tutorial I've linked also mentions
|
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. |
Hello,
I'd like to kindly ask you if you could add a section in the README about how to setup
winston-syslog
for remote logging in cloudflare workers. I'm following this tutorial but the build fails:I'm now looking into webpack and its
resolve.fallback
configuration, but I'm new to these things and it might take a while.Thanks
The text was updated successfully, but these errors were encountered: