-
Notifications
You must be signed in to change notification settings - Fork 11
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
Logging to file does not work #2
Comments
Hmzz, that's odd. I'll see if I can reproduce it. Which version of Node are your running? Because I do have some tests written against it: https://github.com/observing/devnull/blob/master/tests/streamer.transport.test.js |
I am running the latest 0.6.14. I will try and write something smaller to see if that works. Maybe I submitted this to early (sorry) |
I'm able to reproduce it because it only supports once instance of a logger type, by default it uses the process.stdout which is also So as work around you can do: new Logger({ base: false }) So it disables logging to stdout, i'll to lift this limitation. Thanks for reporting it. |
I wanted to add logging to https://github.com/komola/node-eyefi see app.js. But sadly that creates an error: fs.js:307 |
Do you have the complete stacktrace for me? As this doesn't referrer to anything that devnull does. |
All I really did was pull the latest version did an npm install an started it with node app.js When I take away the logger.log function it works. I created the stream just as you described in your README. Stdout works fine but the file stream doesn't. |
I can't really reproduce it, if we take a look at https://github.com/observing/devnull/blob/master/example/stream.js which does the same as your code, it runs perfectly, without any issues. So if you have test cases that narrows it down, it would be great! |
I am trying to use the logging functions from devnull in my project https://github.com/komola/sysctrl
The configuration etc. is done in: https://github.com/komola/sysctrl/blob/master/app.coffee (Line 1 to 8) the file https://github.com/komola/sysctrl/blob/master/logger.coffee makes it available from everywhere. That way I can simply require the logger and get the same instance.
The file logger.log was created but no logs are sent there.
The text was updated successfully, but these errors were encountered: