Need some guidance on the Logging liberary

Hi All,

Looking on some guidance on the logging library which i can incorporate in my project.The requirements are

  • Logs can be directed to some file.
  • Logs should be rotated on daily basis.Name shall be configurable on the basis of date when it is rotated so that we could refer it easily.
  • Logs should be rotatable on the basis of size/number of lines of the log file.
  • It shall print the file or function name with date time apart from message we want to print.
  • Shall have logging level.

I tried using log4go “https://github.com/jeanphorn/log4go” and i am getting the messages but not really happy with the rotation part.point 2,4 are not working properly.

Regards,
Rajesh

2 Likes

i don’t know if i understood right but if i did if you didn’t tried https://github.com/sirupsen/logrus you can try it

2 Likes

also, whilst you’re looking at logs… this may be helpful https://godoc.org/github.com/kr/logfmt :slight_smile:

2 Likes

oh, logrus does logfmt format by default :wink: so yay

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.