Thanks Edgar,
I'll give custom templates a look!
I triple checked my production.ini and also tried a lot of changes, I report
it below as it is now (only the logging part), no queries are logged.
The only SA log messages present are tables creation doing setup-app.
I read somewhere, maybe here on group but can't find it again, that
sqlalchemy has a particular handling of logs to avoid multiplication of
function calls that gives problems with Apache but I'm not sure since I did
not understand if problem was related with mine.
# Logging configuration
[loggers]
keys = root, routes, sensor, sqlalchemy, importd
[handlers]
keys = console, accesslog, importdlog
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = accesslog
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
# "level = DEBUG" logs the route matched and routing variables.
[logger_sensor]
level = INFO
handlers =
qualname = sensor
[logger_importd]
level = INFO
handlers = importdlog
qualname = sensor.lib.importutils
propagate = 0
[logger_sqlalchemy]
level = INFO
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[handler_accesslog]
class = handlers.TimedRotatingFileHandler
#TimedRotatingFileHandler(filename[, when[, interval[, backupCount[,
encoding[, delay[, utc]]]]]])
args = ('/home/neurino/sensor/log/sensor.log', 'midnight', 1, 30, 'utf-8')
level = INFO
formatter = generic
[handler_importdlog]
class = handlers.TimedRotatingFileHandler
#TimedRotatingFileHandler(filename[, when[, interval[, backupCount[,
encoding[, delay[, utc]]]]]])
args = ('/home/neurino/sensor/log/importd.log', 'midnight', 1, 30, 'utf-8')
level = INFO
formatter = generic
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s]
[%(threadName)s] %(message)s
datefmt = %d-%m-%y %H:%M:%S
Thanks
neurino
2011/3/4 Lance Edgar <[email protected]>
> On 03/03/2011 08:59 AM, neurino wrote:
>
> Every time I easy_install a new version I find again and again default
> public/index.html "Welcome to pylons" page opening / even if I removed
> the file from source (who's going to put it back in place in `python
> setup.py bdist_egg`???).
>
> The right route to controller action is in routing but it's ignored
> until I don't remove index.html and I have to do this e-v-e-r-y time I
> install a new version.
>
>
> I believe that file (public/index.html) comes from the paster template
> you're using. You could stop seeing it if you used a different template,
> e.g. by creating your
> own<http://wiki.pylonshq.com/display/pylonscookbook/Creating%20Templates%20For%20The%20paster%20create%20Command>
> .
>
>
> Moreover I can't get sqlalchemy to trace to log however I set log
> level in production.ini.
>
>
> Your current production.ini would be useful in determining the problem, but
> perhaps this example will help:
>
>
> [loggers]
> keys = root, sqlalchemy
>
> [handlers]
> keys = file
>
> [formatters]
> keys = generic
>
> [logger_root]
> level = WARNING
> handlers = file
>
> [logger_sqlalchemy]
> qualname = sqlalchemy
> handlers =
> level = INFO
>
> [handler_file]
> class = FileHandler
> args = ('myapp.log', 'a')
> formatter = generic
>
> [formatter_generic]
> format = %(asctime)s %(name)s: %(levelname)s: %(message)s
> datefmt = %Y-%m-%d %H:%M:%S
>
>
> Lance
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" 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/pylons-discuss?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.