echo=0/1/False/True should still sort of work, but if TG is using the
standard logging module (looks like it is), then you probably dont
want to use "echo" flags anymore since they try to create their own
logging config.
SA's logging uses package-based namespace prefixes....im not sure
what TG uses although from below it seems like its using "debug_out",
"access_out", etc.
SA's prefixes that have logging are currently:
sqlalchemy.engine INFO or DEBUG
sqlalchemy.orm INFO or DEBUG
this corresponds to logging.getLogger('sqlalchemy.engine').setLevel
(logging.DEBUG), for example.
On Oct 22, 2006, at 10:22 PM, Jorge Vargas wrote:
>
> hi I'm reviwing the default config files for turbogears and found
> some things.
>
> is this statement correct?
> # set to 1 to make SQLAlchemy echo SQL commands on the console
> sqlalchemy.echo = 0
>
> I believe the correct entry is true/false, but since 0 = false I think
> this works too. but which one is "politically correct"
>
> also what is the recommended setup for SA 0.3? both for prod and dev.
>
> I assume dev
> echo=true
> logging level debug
>
> prod
> echo=false
> logging level warning
>
> please note this is for the default config of Turbogears projects so
> I'll like to have good input data since well we know most users never
> changes the defaults :)
>
> this is the default TG logging config
>
> is this a good configuration for SA too?
>
> [logging]
> [[formatters]]
> [[[message_only]]]
> format='*(message)s'
>
> [[[full_content]]]
> format='*(asctime)s *(name)s *(levelname)s *(message)s'
>
> [[handlers]]
> [[[debug_out]]]
> class='StreamHandler'
> level='DEBUG'
> args='(sys.stdout,)'
> formatter='full_content'
>
> [[[access_out]]]
> class='StreamHandler'
> level='INFO'
> args='(sys.stdout,)'
> formatter='message_only'
>
> [[[error_out]]]
> class='StreamHandler'
> level='ERROR'
> args='(sys.stdout,)'
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy
-~----------~----~----~----~------~----~------~--~---