easyloggingpp icon indicating copy to clipboard operation
easyloggingpp copied to clipboard

[BUG] The parser of .conf can't parse two %datetime with different format

Open xinwf opened this issue 6 years ago • 2 comments

* GLOBAL:
    ENABLED                 =   true
    TO_FILE                 =   true
    TO_STANDARD_OUTPUT      =   true
    FORMAT                  =   "[%level|%datetime{%m:%s} %fbase:%line] %msg"
    FILENAME                =   "/home/mate/LOG/%datetime{%Y%M%d}/log_%datetime{%Y%M%d_%H}.log"
    MILLISECONDS_WIDTH      =   3
    PERFORMANCE_TRACKING    =   false
    MAX_LOG_FILE_SIZE       =   1048576
    LOG_FLUSH_THRESHOLD     =   0
	
* VERBOSE:
    ENABLED                 =   false

It is a very simple conf file, if the FILENAME has two datetime with different formats, it only parses once, and then replace all %datetime with first format, ignoring others as a normal string. An example of this:

log_20190821{%Y%M%d_%H}.log

xinwf avatar Aug 21 '19 06:08 xinwf