Skip to content
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

Format #10

Open
dschrempf opened this issue Sep 6, 2019 · 3 comments
Open

Format #10

dschrempf opened this issue Sep 6, 2019 · 3 comments

Comments

@dschrempf
Copy link

dschrempf commented Sep 6, 2019

I would like to use the monad-logger framework but find it very difficult to change the format of log messages.

I managed to write my own runFileLoggingT function, which uses not the
defaultOutput function, but a custom function preparing the output. The
rewrite, however, requires considerable effort and is by no means user-friendly.
For example, I had to tinker around with MonadBaseControl.

Further, is it possible to use time stamps in my log messaes without writing my
own runFileLoggingT?

Do you think it is possible to provide an easier way to format the log messages?
It may well be that I missed how monad-logger should be used. In this case, it
would be good to provide some more documentation.

Thank you for your help!

Edit: I also wanted to log to stderr and a file at the same time. Does it also require a custom runLoggingT implementation?

@zzantares
Copy link

Hello @dschrempf I'm also interested to logging out to multiple destinations + timestamps, did you managed to do that? any pointers?

@dschrempf
Copy link
Author

dschrempf commented Oct 4, 2019 via email

@zzantares
Copy link

Thank you! I was about to go down this route but in the end I settled for Katip which has support out of the box for what I needed, timestamps are added by default and writting to multiple targets is done by defining scribes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants