commercialhaskell / rio

A standard library for Haskell
Other
838 stars 54 forks source link

About logging #182

Closed leptonyu closed 5 years ago

leptonyu commented 5 years ago

I watched the webinar about rio. RIO provide logging functions, logger creator and log options as some other logger package, such as monad-logger or fast-logger.

  1. Does LogFunc generated by logOptionsHandle supports high performance logging?
  2. logUseTime seems to work only for debug mode, because getZonedTime could slow down logging speed. Sometimes we may need record time for every log, so do you have any plans to improve this?
  3. newLogFunc defines a standard format of log and provide fixed log parameters. Sometimes we need add opentracing or call context into log, for better tracing the call stack in process or between process. newLogFunc provides a formatted log, but i cannot extend it by adding new information. Then I have to create my own LogFunc.
  4. Will you provide functions for rotating logger files?
snoyberg commented 5 years ago
  1. I don't know the definition of high performance here, but it is intended to be fast.
  2. I don't have plans to improve this, and it is intended for debug. In production usages, I would add the timestamps at the log collection agent.
  3. I'm not sure if this is a question.
  4. I don't have intention of providing such functions, as I consider that the responsibility of deployment code. I'm not opposed to an addition along those lines from others, or perhaps a rio-logging package add-on that provides more flexibility.