Skip to content
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

logging configuration not causing output to stdout #1401

Closed
jrns1001 opened this issue Nov 15, 2015 · 4 comments
Closed

logging configuration not causing output to stdout #1401

jrns1001 opened this issue Nov 15, 2015 · 4 comments

Comments

@jrns1001
Copy link

When using a logging config file, Luigi does not respect the argument to use stdout. It would be ideal to be able to direct different log levels to stdout/stdiin

[formatters]
keys: default

[handlers]
keys: console, logfile

[loggers]
keys: root, luigi-interface

[formatter_default]
format: %(asctime)-15s %(levelname)-8s [%(filename)s:%(lineno)s - %(funcName)10s()] - %(message)10s

[formatter_generic]
class=logging.Formatter
format=%(asctime)s %(levelname)s [%(filename)s:%(lineno)s - %(funcName)10s()] %(message)s
datefmt=

[handler_console]
class: StreamHandler
args: [sys.stdout,]
formatter: default

[handler_logfile]
class: FileHandler
args: ['/logs/workflow.log']
formatter: default

[logger_root]
level: INFO
handlers: console, logfile
qualname: root
propagate=1

[logger_luigi-interface]
level: INFO
handlers: console, logfile
qualname: luigi
propagate=1

@jrns1001
Copy link
Author

In the [handler_console] section. The args: [sys.stdout,] parameter should allow the log to be written to stdout.

@kwilcox
Copy link
Contributor

kwilcox commented Jan 14, 2016

Try changing thequalname in [logger_luigi-interface] to the appropriate logger name.

[logger_luigi-interface]
level: INFO
handlers: console, logfile
qualname: luigi-interface
propagate=1

@Tarrasch
Copy link
Contributor

Here is what I use. Though I'm a noob at logging configuration though.

[loggers]
keys=root,luigi

[handlers]
keys=consoleHandler

[formatters]
keys=consoleFormatter

[logger_root]
level=WARNING
handlers=consoleHandler

[logger_luigi]
level=DEBUG
handlers=consoleHandler
qualname=luigi-interface
propagate=0

[handler_consoleHandler]
class=StreamHandler
level=DEBUG
formatter=consoleFormatter
args=(sys.stdout,)

[formatter_consoleFormatter]
format=%(levelname)s: %(message)s
datefmt=

@mfcabrera
Copy link
Contributor

closing this issue.

  • It has been inactive for +4 months.
  • It's not about luigi core, so not as many users are affected about this.
  • The change seems quite big, it's unlikely to be sporadically picked up.
  • The owner haven't responded or disappeared.
  • I don't understand what this issue is about.
  • There exists a reasonable workaround for this.
  • We need to check if this hasn't been fixed by now (for old issues).
  • This is kind of by design and not a bug.
  • Resolving this would probably add a lot of complexity.

Every open issue adds some clutter, and we try to make the issues fewer and make it easier for new collaborators to find. Currently we try to close any issue that meets the first checkbox + one other.

Feel free to reopen this issue at any point if you have the intent to continue to work this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants