plog
plog copied to clipboard
A few proposals
- Parameterize the RollingFileAppender It would be great if the RollingFileAppender could be parameterized on the File. Would be easy to plug in a custom file writer without changing the file management logic.
- Add ability to include a name of the 'facility' (Record::instanceId) to a log line. Would rely on an external functions to map an id to a string. Could be a template parameter to the formatters.
- Make logging of the 'this' and function optional. For now I did this: #if defined LOG_THIS_AND_FUNC ss << record.getObject() << PLOG_NSTR(";"); ss << record.getFunc() << PLOG_NSTR("@") << record.getLine() << PLOG_NSTR(";"); #endif
Thanks!
It's interesting what another File implementation could be?
At least one such option would be a ZIP file writer. Yes, there are some places that require log files to be encrypted and generally inaccessible to a local user. Another option would be remote logging - sending the file to a logging server. Maybe there are more options.
The encryption/encoding could be performed by a converter, of course, but that would be line-by-line and producing a standard .zip file would be difficult.