Roman Pokrovskij
Roman Pokrovskij

Reputation: 9776

How to configure Enterprise Library formatters not to remove "new lines" from the logged message?

How to configure formatters not to remove "new lines" from the logged message?

logAttribute.Message="@p1='aa'\n@p2='bb'"

I want to find in the log:

@p1='aa'
@p2='bb'

Not

@p1='aa'@p2='bb'

Upvotes: 0

Views: 241

Answers (1)

Grigori Melnik
Grigori Melnik

Reputation: 4107

Use a literal string and force the actual break. Not elegant, but will do the job.

Alternatively, write your custom formatter.

Upvotes: 1

Related Questions