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

Allow header/footer in DDLogFormatter #16

Closed
chrisdolan opened this issue Dec 28, 2011 · 1 comment
Closed

Allow header/footer in DDLogFormatter #16

chrisdolan opened this issue Dec 28, 2011 · 1 comment

Comments

@chrisdolan
Copy link

In some log file syntaxes (like XML) it's useful for the log formatter to support a header and footer method that are invoked at the beginning and end of the log stream. For plain text log formats, these will be the empty string.

Please either add header and footer methods to the DDLogFormatter protocol, or add a new protocol with those methods that is checked and invoked when a new log file is opened or closed.

Consider the Layout interface of the Java Logback framework: https://github.com/ceki/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/Layout.java

@robbiehanson
Copy link
Contributor

The log file syntax (like XML) should be the responsibility of the logger, not the formatter.

Take the XML example: One could extend the DDFileLogger class (DDXMLFileLogger) and automatically append the header and footer.

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