emabee / flexi_logger

A flexible logger for rust programs that can write to stderr, stdout, and/or to log files
Apache License 2.0
315 stars 55 forks source link

Add log rotation and detailed formatting examples #67

Closed devzbysiu closed 4 years ago

devzbysiu commented 4 years ago

Hello. First of all thank you for sharing your work, I really appreciate that.

In this PR I'm adding two examples:

  1. Log rotation usage.
  2. Detailed formatting.

When I was working with your library it took me more time that I would expect to get the idea how to configure log rotation with detailed formatting, that's why I created this PR.

When writing the code I realized that I could easily get the idea how to configure the logger by looking on the code in tests dir, however I think it will be easier for people to skim through examples dir first and the chance of missing sample code is smaller