sclorg / container-workflow-tool

MIT License
1 stars 9 forks source link

Add possibility to log some functions into file #30

Closed phracek closed 3 years ago

phracek commented 3 years ago

This allows container-workflow-tool to log some actions into a file specified by --output-file option. This option can help with automation.

Signed-off-by: Petr "Stone" Hracek phracek@redhat.com

pkubatrh commented 3 years ago

Since we are using Logger for most of the output, maybe it would be better to move to using Logger instead of the print functions you are touching and update Logger setup to be able to change the log output to a file.

WDYT @phracek

phracek commented 3 years ago

Thanks for your comment. It looks good, logger_file can be used for it, and output_file can be used for it. I will try to do it.

phracek commented 3 years ago

@pkubatrh As soon as parameter --output-file is specified then all logs for specific functions are written to the file. For now:

phracek commented 3 years ago

I have merged by mistake :( Sorry.