You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.
I configured Dapper.Logging library to log SQL Server Dapper queries but when checking logs on Kibanna the message is always shown as this:
Dapper query: {query} Parameters: {params}, elapsed: {elapsed} ms, context: {@context}, connection: {@connection}
Startup config:
Console logs:
Kibana logs:
Expected result:
The Kibana logged message should be the same as the console log.
The text was updated successfully, but these errors were encountered:
Sorry for a really late reply. For some reason, I don't get notifications when somebody opens an issue.
Kibana uses 2 separate fields:
message = message template,
rendered message = message with all placeholder values baked in.
This way you can filter out all the messages by their template.
Are you sure that there's no rendered message field in the Kibana logs?
Sorry for a really late reply. For some reason, I don't get notifications when somebody opens an issue.
Kibana uses 2 separate fields:
message = message template,
rendered message = message with all placeholder values baked in.
This way you can filter out all the messages by their template.
Are you sure that there's no rendered message field in the Kibana logs?
Sorry for my late reply as well. Right now, only the message (message template) is being sent to Kibana. How can I Send both parameters to Kibana using NLog? My configuration is as follows:
And:
But the result is the following:
The JSON object sent is missing the rendered message property.
Hello @carlos0202 ,
I'm not an NLog expert, but it seems like structured logging using requires some additional configuration: https://github.com/NLog/NLog/wiki/How-to-use-structured-logging#using-structured-logging
Since the console output is fine, the issue is probably with a JSON/ELK sink configuration.
BTW, Serilog has structured logging out of the box and integrates with different sinks, including ELK in a few lines of code. I forgot when I saw other logging frameworks in modern projects the last time.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I configured Dapper.Logging library to log SQL Server Dapper queries but when checking logs on Kibanna the message is always shown as this:
Dapper query: {query} Parameters: {params}, elapsed: {elapsed} ms, context: {@context}, connection: {@connection}
Startup config:
Console logs:
Kibana logs:
Expected result:
The Kibana logged message should be the same as the console log.
The text was updated successfully, but these errors were encountered: