observing / devnull Goto Github PK
View Code? Open in Web Editor NEWdev/null, a powerful logging module for Node.js.. Because logging to dev/null is fast! <3
Home Page: dev/null
License: MIT License
dev/null, a powerful logging module for Node.js.. Because logging to dev/null is fast! <3
Home Page: dev/null
License: MIT License
When I call logger.error (like in your example in README.md), the application crashes:
2011-12-01 07:59:07 log: (module/_compile) hello world
2011-12-01 07:59:07 info: (module/_compile) pew pew
2011-12-01 07:59:07 error: (module/_compile) oh noes, something goes terribly wrong
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Uncaught, unspecified 'error' event.
at [object Object].emit (events.js:50:15)
at [object Object].write (/Users/nkaiser/sync/app/test/devnull/node_modules/devnull/lib/logger.js:252:10)
at [object Object].error (eval at levelr (/Users/nkaiser/sync/app/test/devnull/node_modules/devnull/lib/logger.js:429:29))
at Object.<anonymous> (/Users/nkaiser/sync/app/test/devnull/test.js:6:8)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)
at Module.load (module.js:351:31)
at Function._load (module.js:310:12)
at Array.0 (module.js:470:10)
at EventEmitter._tickCallback (node.js:192:40)
Hi! Thanks for the great module! I was wondering if there's any chance of lobbying for a 0.0.13 release so we can npm install
a version that doesn't trigger the deprecation warning about process.eventEmitter
?
When you are logging from multiple modules, it can be quite annoying to figure out where a certain log is coming from. Especially if the filename is the same everywhere:
2013-10-31 10:10:23 info: (index.js/end/EventEmitter.emit) The cmd connection has closed
2013-10-31 10:10:23 info: (index.js/reconnecting/EventEmitter.emit) The cmd connection is reconnecting { delay: 255, attempt: 2 }
2013-10-31 10:10:24 debug: (index.js/connect/EventEmitter.emit) The cmd connection has conneccted
2013-10-31 10:10:24 debug: (index.js/ready/EventEmitter.emit) The cmd connection is ready
2013-10-31 10:13:25 info: (index.js/end/EventEmitter.emit) The cmd connection has closed
2013-10-31 10:13:25 info: (index.js/reconnecting/EventEmitter.emit) The cmd connection is reconnecting { delay: 255, attempt: 2 }
2013-10-31 10:13:26 debug: (index.js/connect/EventEmitter.emit) The cmd connection has conneccted
2013-10-31 10:13:27 debug: (index.js/ready/EventEmitter.emit) The cmd connection is ready
2013-10-31 10:16:27 info: (index.js/end/EventEmitter.emit) The cmd connection has closed
2013-10-31 10:16:27 info: (index.js/reconnecting/EventEmitter.emit) The cmd connection is reconnecting { delay: 255, attempt: 2 }
2013-10-31 10:16:28 debug: (index.js/connect/EventEmitter.emit) The cmd connection has conneccted
2013-10-31 10:16:29 debug: (index.js/ready/EventEmitter.emit) The cmd connection is ready
2013-10-31 10:19:30 info: (index.js/end/EventEmitter.emit) The cmd connection has closed
2013-10-31 10:19:30 info: (index.js/reconnecting/EventEmitter.emit) The cmd connection is reconnecting { delay: 255, attempt: 2 }
2013-10-31 10:19:31 debug: (index.js/connect/EventEmitter.emit) The cmd connection has conneccted
2013-10-31 10:19:32 debug: (index.js/ready/EventEmitter.emit) The cmd connection is ready
2013-10-31 10:22:32 info: (index.js/end/EventEmitter.emit) The cmd connection has closed
2013-10-31 10:22:32 info: (index.js/reconnecting/EventEmitter.emit) The cmd connection is reconnecting { delay: 255, attempt: 2 }
2013-10-31 10:22:33 debug: (index.js/connect/EventEmitter.emit) The cmd connection has conneccted
2013-10-31 10:22:34 debug: (index.js/ready/EventEmitter.emit) The cmd connection is ready
In the case above, you still have no idea where the log message is coming from. Having the project name would be super helpful
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.