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

Use Structured Logging #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ArthNRick
Copy link

Structured logging is the practice of implementing a consistent, predetermined message format for application logs that allows them to be treated as data sets rather than text. The idea of structured logging is to take an application log that is delivered as a string of text and convert it into a simple relational data set that can be more easily searched and analyzed.

https://docs.microsoft.com/pt-br/aspnet/core/fundamentals/logging/?view=aspnetcore-6.0#log-message-template

Copy link

@Nardax Nardax left a comment

Choose a reason for hiding this comment

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

structured logging is a nice improvement here.

try
{
logger.LogTrace("UnlockInstance enter {host}: {redisKey}, {LockId}");

Choose a reason for hiding this comment

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

Values to log are missing

Copy link

Choose a reason for hiding this comment

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

Please fix placeholder casing. Microsoft recommends to use PascalCase - should be {Host}, {RedisKey} and {LockId}

try
{
logger.LogTrace("UnlockInstanceAsync enter {host}: {redisKey}, {LockId}",

This comment was marked as resolved.

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.

None yet

4 participants