FAQ
I don't think `err` is a valid string, try `error` instead

Thomas Blobaum
https://github.com/tblobaum/

On Fri, Dec 27, 2013 at 10:20 AM, Reza Razavipour wrote:

I am prototyping logging for my node.js application and started with
rconsole package. Not clear how to set the logging levels. I have the
following code and regardless of what debug level I set, I see the same
output.

require('rconsole')


console.set({
facility: 'local0' // default: user
, title: 'web-01' // default: node -- can also be set with `process.title`
, highestLevel: 'err' // [emerg, alert, crit, err, warning, notice, info, debug]
, stdout: false // default: false
, stderr: true // default: true
, syslog: true // default: true
, syslogHashTags: false // default: false
, showTime: true // default: true
, showLine: true // default: true
, showFile: true // default: true
, showTags: true // default: true })


console.warn('level is set to err and this is a warn');
console.notice('notice');
console.error('error');

console.set({
highestLevel: 'notice',
stderr: false
})

console.warn('level is set to notice warn and this is a warn');
console.notice('notice');
console.error('error');
console.set({
highestLevel: 'crit',
stderr: false
})

console.warn('level is set to notice crit and this is a warn');
console.notice('notice');
console.error('error');

and the output, I always see the same output which is

level is set to err and this is a warn
notice
error
level is set to notice warn and this is a warn
notice
error
level is set to notice crit and this is a warn
notice
error

Can someone explain to me what I am doing wrong here?

--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to nodejs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupnodejs @
categoriesnodejs
postedDec 27, '13 at 4:20p
activeDec 27, '13 at 5:30p
posts3
users2
websitenodejs.org
irc#node.js

2 users in discussion

Reza Razavipour: 2 posts Thomas Blobaum: 1 post

People

Translate

site design / logo © 2022 Grokbase