On Jun 21, 2007, at 4:11 PM, Paul McNett wrote:
> I'm not sure. The Dabo infoLog defaults to sys.stdout, and errorLog
> defaults to sys.stderr. It is only a coincidence that stdout and
> stderr
> go to the console.
>
> It seems that the logged information could be helpful, but if it isn't
> then people could direct infoLog to a file or the bitbucket.
>
> So, I think we need to answer a couple questions:
>
> 1) What types of information should go to the dabo infoLog
> 2) Should the dabo infoLog log to stdout by default, or somewhere
> else?
Most logging systems have various levels of logging, and a setting
to determine which messages should be shown/recorded. Take the Python
logger module, for example:
"Logged messages also have levels of importance associated with them.
The default levels provided are DEBUG, INFO, WARNING, ERROR and
CRITICAL. As a convenience, you indicate the importance of a logged
message by calling an appropriate method of Logger. The methods are
debug(), info(), warning(), error() and critical(), which mirror the
default levels. You are not constrained to use these levels: you can
specify your own and use a more general Logger method, log(), which
takes an explicit level argument."
Perhaps we could mirror this structure, and instead of
dabo.infoLog.write() and dabo.errorLog.write(), we could implement
the functions dabo.logInfo() and dabo.logError(), along with
dabo.logWarning(), dabo.logError() and dabo.logCritical().
Thoughts?
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]