Application logging to screen and file - any favorite modules (no luck on cheeseshop)

M

metaperl

Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)

I tried to use cheeseshop to find such a module, but came up short. I
clicked on
Browse Tree -> Software Development but then did not see a subcategory
for logging, so did not know where to look. I then typed log into the
search box, but that didn't really turn up the modules which had login
their description so I posted here.
 
R

Robert Kern

metaperl said:
Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)

I tried to use cheeseshop to find such a module, but came up short. I
clicked on
Browse Tree -> Software Development but then did not see a subcategory
for logging, so did not know where to look. I then typed log into the
search box, but that didn't really turn up the modules which had login
their description so I posted here.

You should look in the standard library before hitting the Package Index.

http://www.python.org/doc/current/lib/module-logging.html

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
B

Bjoern Schliessmann

metaperl said:
Hello, I am looking for a module which has
* log levels
* output to stdout and file (either/or based on config)
* nicely formatted log output (e.g., indentation when appropriate)

Sorry for being nosey, but how'd you use indentation in a log?

Regards,


Björn
 
G

Gabriel Genellina

Sorry for being nosey, but how'd you use indentation in a log?

I do - what's wrong? Imagine the following on a single line...

[328] 2006-09-23T06:41:50 BLATHER(-100) VerboseSecurity Unauthorized: Your
[328] user account does not have the required permission. Access to
[328] 'manage_main' of (Folder instance at 033C8290) (/Softlab/otros)
[328] denied. Your user account, softlab, exists at /acl_users. Access
[328] requires one of the following roles: ['Softlab']. Your roles in this
[328] context are ['Authenticated', 'Manager', 'Owner'].



Gabriel Genellina
Softlab SRL





__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
 
M

metaperl

Bjoern said:
Sorry for being nosey, but how'd you use indentation in a log?

I guess I was thinking more along the lines of debugging. For example,
if you have two nested loops, you can increase the indentation level of
output as you move into each loop to show where the output is coming
from.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top