Enterprise Library 4.0: How to get rid of headers and footers when using a Rolling Flat File Trace Listener

Topics: Logging Application Block
Feb 22, 2010 at 4:01 PM

As the title already says, is there a way to get rid of the headers and footers that are placed before and after each log entry when using a Rolling Flat File Trace Listener? Although I cleared the "Header" and "Footer" properties the log file still shows an empty line before and after each log entry.

Feb 23, 2010 at 2:29 AM

Check your formatter's Template property, you probably entered a new line there.



Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 23, 2010 at 6:53 AM

No, I've already double checked the Formatter Template. It only consists of a single line without any {new line} tag.

Feb 23, 2010 at 7:08 AM

It's possible that you don't see any {newline} tags but you have blank line spaces right after the formatter.  You can manually place your cursor to check that or open your config in xml editor.  See if there are 


 characters right after the last text of your formatter template.

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com