Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was 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

Description

@agilenut

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions