60 questions
0
votes
1
answer
272
views
How to mask sensitive values (e.g., passwords, API keys) in structured logs in Spring Boot 3.4?
I’m using Spring Boot 3.4 with structured logging (via JsonWriterStructuredLogFormatter), and I want to mask sensitive data such as passwords, API keys, and tokens from the message field in the logs.
...
0
votes
1
answer
363
views
Derived Fields in Grafana for Loki doesn't generate a hyperlink on structured metadata log
I am using the Loki /otlp endpoint for ingesting logs which automatically handles a few semantic labels for you such as service.name, service.instance.id and deployment.environment to name a few and ...
0
votes
1
answer
74
views
C# Hosting: How do I avoid exception messages from crashed BackgroundServices in STDOUT
We're using structured logging on all our services, so all logs are in json format. When a BackgroundService crashes, it prints a cleartext stacktrace onto STDOUT. I'd like to be able to catch ...
1
vote
2
answers
2k
views
Adding extra properties to ILogger<T> structured logging
Using ILogger<T>, is there a way to add log properties in addition to the ones covered by the message template?
For example:
_logger.LogInformation("Order {OrderNumber} was registered."...
0
votes
2
answers
79
views
Get asctime from the logging python lib
I am using the logging python library in order to log some structured JSON.
My idea was to do it manually following the example in the documentation, by giving a config with only the message :
logging....
0
votes
1
answer
171
views
JSON Logging with named fields in Java?
Here is the Golang version of what I want to do in Java:
package main
import (
"log/slog"
"os"
)
func main() {
logLevel := new(slog.LevelVar) // Info by default
...
0
votes
1
answer
112
views
Where can I find the function that formats a log string and its parameters with the new Structured Logging format?
Where can I find the function that formats a log string and its parameters with the new Structured Logging format. I'm looking for the equivalent of "string.Format(..." but for Structured ...
0
votes
0
answers
934
views
GCloud Logging Write - Json as String inside a Structured Logs JsonPayload.message Field
I am currently working with gcloud monitoring. I searched for a way to write log messages similar to
already incoming logs. To mimic the real log entry, I am writing a log from a pod via "echo&...
2
votes
0
answers
334
views
How to use NLog structured logging when a object has a property with an exception?
I am trying to use structured logging and log an object.
I run into this error when trying to log the object: System.IO.FileNotFoundException: 'Could not find file 'C:\Non-Existent-File'.' This ...
1
vote
0
answers
32
views
How to temporarily disable/mute logging using Zap logger in Go [duplicate]
How to temporarily disable logging using Zap logger in Go.
I need to mute logs for a particular function without removing logger print statements.
I need a solution similar to what we do for fmt as ...
0
votes
1
answer
1k
views
What method is called during Ilogger conversion of structured logging arguments to string?
I have an object that I want to pass to logging (default built-in logging to console, no libraries used) as argument like this:
logger.LogDebug("Executing MongoDB command: {Command}", ...
0
votes
0
answers
164
views
NLog: reference properties in message
I am using NLog with structured logging for the first time. I user Serilog in the past, and with that I could write something like this:
Serilog.ILogger logger = CreateSerilogLogger();
logger....
1
vote
0
answers
655
views
In NLog fluent logging, how can I force a log property to be rendered as JSON?
I'm using NLog to create semantic logs in a Seq server. I want to log an object that has a ToString() method that produces a short human readable summary of the data content. So I want to render the ...
6
votes
0
answers
216
views
How to handle field collisions from different logging sources in Elasticsearch?
We send logs from a variety of services running in a Kubernetes cluster to Elasticsearch via Filebeat. Some of these services we develop ourselves, others are third-party. We use dynamic mapping in ...
2
votes
2
answers
2k
views
Is there a human readable structured logging fomat?
I'd like my program to write to its stderr a log that is simultaneously human and machine readable.
Requirements:
A log is a stream of messages. I.e. I can't write just one big xml or json document. ...
0
votes
2
answers
645
views
Structured Logging in Azure Functions
i am trying to get structured logging working in a Azure Function, but it does not work on my side.
I wrote a simple application like this
[FunctionName("Dummy")]
public IActionResult Run([...
2
votes
0
answers
717
views
ElasticSearch's dynamic index mapping dropping logs due to poor field names
I have a semi-large project that has been using nlog, and throughout I re-used alot of field names for different datatypes. I started to send my logs (including all log properties/fields) to ...
3
votes
1
answer
1k
views
NLog Database Parameter + .NET Core: all-event-properties in JSON?
I am using the Database target and trying to figure out a way to send all-event-properties as a parameter in JSON format; I see that parameter includes a property for "format," but when I do ...
2
votes
0
answers
798
views
How to import StructuredArgument for structured logging in scala using slf4j and logback
This is probably a stupid question, but my scala knowledge is a bit lacking. I'm trying to implement structured logging in scala, and we're using slf4j/logback/logstash. I came across the following ...
1
vote
1
answer
692
views
NLog structured logging with duplicate hole names
I'm trying to figure it out what is a correct behaviour for capturing properties with duplicate hole names according message templates syntax which is implemented in the NLog.
Let's look an example.
...
1
vote
1
answer
2k
views
How to write structured logs so that message field is used by GCP Log Viewer?
Question
Is there a way to write structured logs from Cloud Functions such that the message field is automatically displayed as the primary message in GCP Log Viewer?
Using this test, I've found ...
2
votes
2
answers
1k
views
Google StackDriver correlating logs with parent request python 3
In python 2.7, the app engine sdk was doing the work in the background to nest all logs with the parent request to have a correlation in Google StackDriver.
As of the transition to python 3, it is ...
1
vote
1
answer
8k
views
Logback structured logging format timestamp via logback.xml
I want to format the timestamp in my structured logs.
Currently I defined the logback.xml like:
<configuration>
<appender name="json" class="ch.qos.logback.core.ConsoleAppender">
<...
2
votes
2
answers
272
views
Saving structured logs in RavenDB
I’m writing .NET Core application and would like to use structured logging available in .NET Core Logging Extensions to write logs in more structured way. I want to save my logs in RavenDB and I’m ...
8
votes
2
answers
7k
views
Is it possible to use NLog's structured logging without having templated messages?
Until today we have used NLog version 4.4.12 (without structured logging). However we were using https://www.nuget.org/packages/NLog.StructuredLogging.Json/ for structured logging.
The nice thing ...