Hello guys,
>
>
I jump into the discussion long after it was started because I only start 
to use node.js and start to think about what libraries to use.
I'm a little surprised nobody mentionned the way python handle logging 
because I think it is done the right way :
- there is lots of userland logging module but there is one core "logging" 
module that is mainly used by main third-party modules
- third party modules (if they use that core logging module) send their 
messages to a "channel" but don't do anything else (it is not written into 
a file neither displayed in a console neither formatted). It is the 
responsability to the dev of the final application to catch the channels he 
wants (and creates those for his application itself) and do whatever he 
wants (including choosing the right format).

And it is as simple as :
import logging
log_ldap = logging.getLogger('django_auth_ldap')
log_ldap.addHandler(logging.FileHandler(path_to_log_file), 'a'))
log_ldap.setLevel(logging.DEBUG)

In that case, I'm into my own django application which use the python 
module ldap to handle authentication. With these 3 lines of code, I catch 
the logging events from the imported ldap module, decided to write them 
into a file with the level of output DEBUG.

So to go back to node.js, I think it would be wise to have something 
similar (not everything is perfect in python ; if it was the case I would't 
be here, but I really think the logging module is well done).

Best regards,
Nicolas

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to