Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few proposals #291

Open
sashazxtt opened this issue Aug 7, 2024 · 2 comments
Open

A few proposals #291

sashazxtt opened this issue Aug 7, 2024 · 2 comments

Comments

@sashazxtt
Copy link

  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!

@SergiusTheBest
Copy link
Owner

It's interesting what another File implementation could be?

@sashazxtt
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants