New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate log lines using default configuration #39

Closed
alfredodeza opened this Issue Jan 19, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@alfredodeza
Copy link
Contributor

alfredodeza commented Jan 19, 2016

By default on a vanilla Pecan app, duplicate lines are shown when handling a request:

2016-01-19 08:51:52,500 [INFO    ] [pecan.commands.serve][MainThread] "GET / HTTP/1.1" 200 993
2016-01-19 08:51:52,500 [INFO    ] [pecan.commands.serve][MainThread] "GET / HTTP/1.1" 200 993
2016-01-19 08:51:52,519 [INFO    ] [pecan.commands.serve][MainThread] "GET /css/style.css HTTP/1.1" 200 569
2016-01-19 08:51:52,519 [INFO    ] [pecan.commands.serve][MainThread] "GET /css/style.css HTTP/1.1" 200 569
2016-01-19 08:51:52,527 [WARNING ] [pecan.commands.serve][MainThread] "GET /javascript/shared.js HTTP/1.1" 404 411
2016-01-19 08:51:52,527 [WARNING ] [pecan.commands.serve][MainThread] "GET /javascript/shared.js HTTP/1.1" 404 411
2016-01-19 08:51:52,530 [INFO    ] [pecan.commands.serve][MainThread] "GET /images/logo.png HTTP/1.1" 200 20596
2016-01-19 08:51:52,530 [INFO    ] [pecan.commands.serve][MainThread] "GET /images/logo.png HTTP/1.1" 200 20596

This is how it should look:

2016-01-19 08:44:17,714 [INFO    ] [pecan.commands.serve][MainThread] "GET / HTTP/1.1" 200 993
2016-01-19 08:44:17,735 [INFO    ] [pecan.commands.serve][MainThread] "GET /css/style.css HTTP/1.1" 200 569
2016-01-19 08:44:17,740 [WARNING ] [pecan.commands.serve][MainThread] "GET /javascript/shared.js HTTP/1.1" 404 411
2016-01-19 08:44:17,742 [INFO    ] [pecan.commands.serve][MainThread] "GET /images/logo.png HTTP/1.1" 200 20596

This is achieved by adding 'propagate': False to the root logger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment