plog icon indicating copy to clipboard operation
plog copied to clipboard

A few proposals

Open sashazxtt opened this issue 1 year ago • 2 comments

  1. 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.
  2. 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.
  3. 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!

sashazxtt avatar Aug 07 '24 19:08 sashazxtt

It's interesting what another File implementation could be?

SergiusTheBest avatar Aug 08 '24 09:08 SergiusTheBest

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.

sashazxtt avatar Aug 08 '24 18:08 sashazxtt