Filter based on severity #1

Closed
opened 2012-10-30 19:22:54 +02:00 by nodify · 0 comments
nodify commented 2012-10-30 19:22:54 +02:00 (Migrated from github.com)

In the old days, you could filter logging based on severity. That way you could instruct the logger to ignore debug & info level log requests.

So, implement a logLevel() function like this:

var logger = require( 'nodify-logger' );
logger.createInstance( { ... options ... }, function( _f, _m, _i ) {
_i.logLevel( "E" );
_f( _m.I_WHATEVER, "you shouldn't see this message" );
_f( _m.E_DINGO, "space dingo says hello. (you should see this message)." );

... more code ...
} );

In the old days, you could filter logging based on severity. That way you could instruct the logger to ignore debug & info level log requests. So, implement a logLevel() function like this: var logger = require( 'nodify-logger' ); logger.createInstance( { ... options ... }, function( _f, _m, _i ) { _i.logLevel( "E" ); _f( _m.I_WHATEVER, "you shouldn't see this message" ); _f( _m.E_DINGO, "space dingo says hello. (you should see this message)." ); ... more code ... } );
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nodify/nodify-logger#1
No description provided.