singer-python icon indicating copy to clipboard operation
singer-python copied to clipboard

Make logger more customizable

Open Samira-El opened this issue 5 years ago • 3 comments

Description of change

Due to the need to have control over how logs are displayed, e.g showing timestamps, logger name ...etc. I have made these changes so that the taps and targets can provide custom logging.conf file and a logger name.

Manual QA steps

  • Run a tap using these changes and provide custom logging.conf file, then observe the logs. Example of logging file:
[loggers]
keys=root

[handlers] 
keys=stderr

[formatters]
keys=child

[logger_root]
level=INFO
handlers=stderr
formatter=child
propagate=0

[handler_stderr]
class=StreamHandler
formatter=child
args=(sys.stderr,)

[formatter_child]
class=logging.Formatter
format=%(asctime)s %(name)s %(levelname)s: %(message)s
datefmt=%Y-%m-%d %H:%M:%S

Risks

  • None, it is a breaking change though.

Rollback steps

  • revert this branch

Samira-El avatar Jan 06 '20 09:01 Samira-El

Hi @Samira-El, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

cmerrick avatar Jan 06 '20 09:01 cmerrick

You did it @Samira-El!

Thank you for signing the Singer Contribution License Agreement.

cmerrick avatar Jan 06 '20 09:01 cmerrick

Hey, can you provide an ETA for when this will be reviewed and hopefully approved?

Samira-El avatar Jan 06 '20 11:01 Samira-El