You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by NachbarsLumpi <gi...@git.apache.org> on 2016/01/19 08:47:10 UTC

[GitHub] log4net pull request: Add ColoredSmtpAppender. allow user send col...

Github user NachbarsLumpi commented on the pull request:

    https://github.com/apache/log4net/pull/7#issuecomment-172766709
  
    Actually, this problem should be solved with a custom ILayout implementation that is assigned to the appender. You can then change the look of the email by changing the layouts properties:
    
    ILayout.ContentType = "text/html";
    ILayout.Header = "<html><body>";
    ILayout.Footer = "</body></html>";
    
    and by overriding this method the look of every log event can be rendered to html:
    
    void Format(TextWriter writer, LoggingEvent loggingEvent);


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---