Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

LogError with exception and empty message causes formatting issues with ConsoleProvider #619

Closed
agilenut opened this issue May 8, 2017 · 0 comments
Assignees
Milestone

Comments

@agilenut
Copy link

agilenut commented May 8, 2017

When calling the overload of LogError that accepts an exception and a message...

_logger.LogError(
eventId: 0,
exception: exception,
message:"");

... the log header is missing from the resulting log. i.e. The stack trace is logged but the log level, category, and event id are not. If any non-empty / non-null string is used, then it works correctly.

This means that separate logs appear to run together which makes them difficult to read. Also, the color coding is missing since the log level is missing. This further decreases readability.

You could make the argument that this is by design, but I believe it should always log the log header if anything is logged.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants