riga / law

Build large-scale task workflows: luigi + job submission + remote targets + environment sandboxing using Docker/Singularity
http://law.readthedocs.io
BSD 3-Clause "New" or "Revised" License
98 stars 41 forks source link

A contrib module rich logging #98

Closed Nollde closed 4 years ago

Nollde commented 4 years ago

This contrib module aims at providing rich logging capabilities with law. It provides a function, which replaces all standard StreamHandlers in specified scopes with riches RichHandlers.

riga commented 4 years ago

@Nollde Fyi, I had to do a few more changes to prevent having multiple console handlers registered at inconvenient times. Using the current master, you can add

[logging]
luigi-interface: INFO

to your law config, and

law.contrib.load("rich")
law.rich.replace_console_handlers()

somewhere in your setup where it is called once. Works nicely 🎉.