Documentation on TextFormatter template format

Topics: Logging Application Block
Mar 6, 2009 at 8:03 PM
Is there any documentation on how to format the logs with the TextFormatter?  I know the fields that can be specified, I am more interested in how those fields can be customized.  I found one forum article on how the timestamp can be customized with (local:yyyy-MM-dd HH:mm:ss.ffff), but what about the other strings and numbers (severity, category, etc)?  I have tried using (10) :10 ,10 but nothing seems to work.
Mar 9, 2009 at 6:56 AM

Hi,

As far as I know possible field that could be formatted and practical was only timestamp. The rest were good as default. And may I know values (10):10,10 are for?

Regards,
Mayon Man
Mar 9, 2009 at 7:55 AM

For formatting strings:

example

output

String.Format("--{0,10}--", "test");

-- test--

String.Format("--{0,-10}--", "test");

--test --

That way things are aligned properly.

-Scott

From: MayonMan [mailto:notifications@codeplex.com]
Sent: Sunday, March 08, 2009 11:57 PM
To: scott@brainhzsoftware.com
Subject: Re: Documentation on TextFormatter template format [entlib:49459]

From: MayonMan

Hi,

As far as I know possible field that could be formatted and practical was only timestamp. The rest were good as default. And may I know values (10):10,10 are for?

Regards,
Mayon Man

Read the full discussion online.

To add a post to this discussion, reply to this email (entlib@discussions.codeplex.com)

To start a new discussion for this project, email entlib@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Mar 9, 2009 at 10:40 AM

Hi,

TextFormatter may not be able to do what you’re trying. Maybe you could try implementing this on Custom Formatter. I haven’t tried doing this, but it will be great if you will be able to find solution and share it with us. J