Text formatter for fixed width column output?

Topics: Logging Application Block
Jan 8, 2007 at 8:08 PM
Is there a text formatter that can output in fixed width columns (similar to log4net)? It can make for much more readable files.
Jan 15, 2007 at 3:05 PM
There is no formatter for fixed width columns, but you could create one. You could inherit from the current TextFormatter and override the following method:

protected virtual string Format(StringBuilder templateBuilder, LogEntry log)

and handle the padding necessary to maintain fixed columns widths.

You would need to be able to specify columns widths. You could parse that from the template to make things easy.




David Hayden
Microsoft MVP C#