Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVS-1722 Log extra properties of SLCore log events #5924

Draft
wants to merge 3 commits into
base: gb/log-context
Choose a base branch
from

Conversation

georgii-borovinskikh-sonarsource
Copy link
Contributor

@georgii-borovinskikh-sonarsource georgii-borovinskikh-sonarsource commented Dec 24, 2024

public string threadName;
public string loggerName;
// nullable
public string stackTrace;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are missing the loggedAt property. Even if we don't use it for now, I think we should add it.

@@ -34,25 +34,26 @@ public class LoggerListener : ILoggerListener
[ImportingConstructor]
public LoggerListener(ILogger logger)
{
this.logger = logger;
this.logger = logger.ForContext(SLCoreStrings.SLCoreName, SLCoreStrings.SLCoreInternalLogContext);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's enough to add just one context that is a string of type "SlCore Logs". It would occupies less space than [SLCore > Logs].

break;
}

if (parameters.stackTrace != null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the null check inside the LogVerbose method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants