#820: confusing error messages configuring logging
------------------------+---------------------------------------------------
Reporter: max | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 1.0b1
Component: TurboGears | Version: 0.9a5
Severity: normal | Keywords: logging configuration
------------------------+---------------------------------------------------
Given the following logging configuration in my dev.cfg:
{{{
[[handlers]]
[[[debug_out]]]
class='FileHandler'
level='DEBUG'
args=('spaca-tg.log', 'at+')
}}}
Gives weird error message:
{{{
Traceback (most recent call last):
File "D:\Projects\Spaca\start-spaca.py", line 23, in ?
modulename="spaca.config")
File "d:\projects\3rd-party\turbogears-1.0\turbogears\config.py", line
181, in
pdate_config
configure_loggers(configdict)
File "d:\projects\3rd-party\turbogears-1.0\turbogears\config.py", line
129, in
onfigure_loggers
_get_handlers(handlers, formatters)
File "d:\projects\3rd-party\turbogears-1.0\turbogears\config.py", line
41, in _get_handlers
args = eval(args, logging.__dict__)
TypeError: eval() arg 1 must be a string or code object
}}}
At a bare minimum, error messages should be more user-friendly.
In this case, TG could have probably accept a tuple as "args" option (a
string is required, which is non obvious).
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/820>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---