-
Notifications
You must be signed in to change notification settings - Fork 220
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
Add logrus integration #107
Conversation
Awesome work. I will check it. |
Great idea with |
hm, interesting, I thought, that we can different log levels as log groups. for example, the summary will have an info log level, failures will have an error log level. Maybe you're right, but as for me (as for active user of Lefthook), it is not too interesting to output just failures, but interesting to get some general information with failures. Can we do this? or how do you see this feature at all? |
…ture/add-logrus
I see it like this: // somewhere in the code:
loggerClient.Meta(au.Cyan("SYNCING"), au.Bold("lefthook.yml"))
// in logger client we checking config key `output`
if outputMetaEnabled {
log.Println(args...)
} For failure/success keys we store output from processes in pseudo terminal and write in after command ended with some exit code |
yep, that's it! for info log level you will receive errors also, but if you will set log level to error or to warn, you will not get meta information output, that's the way how we can combine outputs. It is imo, we can do it through yml config like here #78 (comment) |
If you sure we can made it with logrus ok. Could you make example in this PR? |
hm, at first, I think, it will be very good to solve issues that I've provided in general comment, because they're some kind of blockers for this :D
could you please check it? |
Ok! I will check it. Just a little busy during the workdays 😅 |
Sorry for so long @rbUUbr !
|
Solved. |
rootCmd
withlog-level
, but seems it does not work :( could you please check it? Because I found out that other flags forrootCmd
also doesn't workcloses #78