Layla-log
A simple logger library. This library provides a simple log writer and simple log level control. It can be used to write logs in a program. The logs can be written to the aimed dictionary. The log level can be set to different levels (Error, Warn, Debug, and Info).
Usage
This can be initialized by using default setting, only the path of the aim dictionary is needed.
use ;
It also provides a function for personal initializing, the following can be decided.
- The path of the aim dictionary.
- The restriction of the log level.
- Show detailed time or not.
- Maximum number of log in a single file. (0 as inf.)
- Prefix of the log file.
Sometimes, a large amount of logs would be written. Then, the function record is not recommended. Instead, the combination of functions push and write_all should be used.
use ;