-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Lumberjack hook for Logrus #679
Comments
No need for that, You could only:
|
Not really, because if you do this, you only log to a file. The hook allows to use logrus the default way and logging to a file. |
Makes sense, Although we can accomplish it without setting the hook. |
@RenathoAzevedo, can you supply an example of how this can be achieved without a hook? |
I do it like this:
|
@phoenix147 Thank you very much! Your solution works great. I have my logger configured as below:
One can also set ForceColors property to true (There is Jetbrains GoLand IDE plugin called ANSI Highlighter that can parse log levels and colors when displaying log files) |
If someone could add these examples in the wiki or in the readme, that would be great. |
@renathoaz I tried your approach but it's not rotating the log file. It keeps writing logs to the same file. Here's my code.
Anyone facing the same problem? |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Hello,
I propose a new hook for Lumberjack : https://github.com/fallais/logrus-lumberjack-hook
The text was updated successfully, but these errors were encountered: