41,684 questions
0
votes
0
answers
20
views
Rsyslog and FluentBit
I am struggling with my logging dataflow. I have fluentbit running a syslog server on localhost to fetch syslog logging. All of that is sent to a Apache Pulsar. When I look at the output I receive it ...
2
votes
1
answer
103
views
Multiple workers using the same log file
I have a FastAPI service which is using granian with 6 workers. I noticed that I'm losing information from logs, there are requests being made, however the rotated logs are missing records for these ...
0
votes
0
answers
30
views
Python logging.config.fileConfig throws KeyError: 'formatters' despite section existing [duplicate]
I am following a Python tutorial and trying to use logging.config.fileConfig() to load a configuration file. Even though I have a [formatters] section in my logging.conf, I receive a KeyError: '...
Tooling
0
votes
0
replies
99
views
Spring boot structured logging issue
Current spring implementation of structured logging with ECS format creates object "service" with fields:
name, version, environment, node
I would like to add field "id" to the ...
3
votes
1
answer
72
views
Handling "level" keyword with structlog wide logging
I want to implement wide logging with Python's structlog. I also want to provide some unit tests for that and I'm really struggling with how to use structlog with underlying stdlib logging. In general ...
Tooling
0
votes
4
replies
81
views
KQL Script to check existence of a file on Azure VM file system
I'm working on some Azure VMs (a mix of Linux and Windows OS) and would like to set up a KQL script that can check for the presence of a named file (e.g. gold_image.dat) in a specific directory on ...
0
votes
1
answer
46
views
Updated Logging to application insights to use the OpenTelemetry SDK, this broke HTTP status code filtration
I've just updated my code for logging to application insights in my project to use the OpenTelementry SDKs, and for some reason I cant get the filtration of 404s Http status codes to work for stuff ...
-3
votes
1
answer
87
views
Flush a file write so that *another program* can read it [duplicate]
I have a python program that is writing a log.
The idea is to tail the log so I know what's going on in the program while it is running.
But no data ever comes until the python program exits.
Even if ...
0
votes
0
answers
52
views
Diagnostics Trace in one application not working, in a test it works
I use the diagnostics.trace functionality for logging.
I've the followin code in a dotnet framework 4.8.1 windows forms app.
private static readonly TraceSource _trace = new TraceSource("...
0
votes
0
answers
34
views
custom mongoid / mongo logger subscribe / unsubscribe to events in production
I have a rails application that uses mongoid. In development, I have a custom logger that basically logs the backtrace in a visual hierarchy. I'd like to roll this into production with the option ...
Best practices
0
votes
8
replies
128
views
.NET logging without passing an ILogger around
I'm trying to figure out how to implement Logging in my ASP.NET Core 9.0 Web API. I don't like having to inject a logger object in every service class, so have been exploring different ways of ...
Best practices
1
vote
5
replies
108
views
Postgres logging using log_statement in conjunction with log_min_duration_statement
I want to log all changes to existing data on the database which is done via
set log_statement to 'mod';
I also want to capture slowing running queries on top of this, e.g.
set ...
0
votes
0
answers
39
views
Add request id to mongoid logger
I am trying to build analytics for my mongo logger. In development mode, I have a custom mongo logger that backtracers the caller so I can see exactly which call triggered a db request. The problem ...
Best practices
0
votes
1
replies
74
views
What additional fields are needed to identify instances of services in metrics, traces, logs - After replicating services across multiple replicas?
After replicating services across multiple instances (replicas), we need to figure out what additional fields are required to identify instances in metrics, traces, logs, and health checks.
For ...
Tooling
1
vote
0
replies
68
views
Multi-Tenant Log Routing with OpenTelemetry?
I am architecting a "Bring Your Own Sink" logging platform. The goal is to allow users to register their own external endpoints (OTLP, S3, Webhooks), and have my platform route their ...
0
votes
1
answer
46
views
change Zookeeper logs location in .NET build folder to another folder
I use ZooKeeperNetEx.dll along side the Confluent.Kafka in my .NET app.
Every time I run the app, a log file with this naming "ZK.2026-02-05-10.06.05.601Z" is generated.
I tried to use use ...
1
vote
1
answer
140
views
How to hide a password send to a web API from Windows logging
To access a web API, I need to authenticate to the specific API first.
In this use case, it concerns a Cyberark API method to:
authenticate a user to Privilege Cloud and returns a token that can be ...
Best practices
1
vote
11
replies
6k
views
Should a C++ logger write method be defined as const?
I'm hesitating whether the Logger Write method should be marked as const:
class Logger {
public:
// Write log message to the terminal
void Write(const string& msg) const;
...
};
In this ...
0
votes
0
answers
32
views
Questions on how to properly setup Snakemake LSF executor Job stderr and stdout logging
I was looking for some help understanding stderr and stdout logging using the lsf executor. I am having trouble getting the jobnames changed and getting the stderr and stdout files to be written ...
0
votes
1
answer
84
views
Laravel logs show incorrect severity levels in Google Cloud Logging
I’m running a Laravel application using the dunglas/frankenphp:1.9-php8.4-alpine Docker image and deploying it on Kubernetes. Logs are written to stderr and collected by Google Cloud’s built-in per-...
Advice
0
votes
2
replies
40
views
Is there a way to automatically back up a PostgreSQL log table when it is updated or deleted?
I have a log table in PostgreSQL (people_log) that tracks changes in my main tables.
The problem is, the log table can grow very large, so I cannot keep all the data in the table indefinitely.
I want ...
0
votes
0
answers
73
views
Specific configuration for logging while using Slf4j
Is there a way to have a custom configuration when using Slf4j without the need to create a custom logger?
Let's say I have a controller, service, or any format of a class, I am using SLF4J for ...
Advice
0
votes
0
replies
17
views
How to rotate logs of unrealengine application?
I have a livelink/metahuman project that generates huge amounts of logs - all needed. The executable is expected to run for prolonged amounts of time. Hence, I need to rotate logs of the running ...
Advice
0
votes
0
replies
22
views
How to configure archiveNaming in Nlog.config?
We're using Nlog version 2.0.0.0 and create our text log files on a daily basis. The naming would be Logfile_${machinename}_${shortdate}.log. The problem is that the size of one log file in one day ...
2
votes
1
answer
123
views
Java log4j2 configuration using different files for different log levels
I have a configuration for log4j2 as a property file which looks like this:
log4j2.properties
property.pattern = %d [%t] %F %-5L %-5p %c - %m%n
appender.0.type = Console
appender.0.name = ...
3
votes
1
answer
76
views
How are logs printed when the handler of last resort is deactivated?
The Python documentation states that logging.lastResort is
A “handler of last resort” [...] writing to sys.stderr with a level of WARNING, and is used to handle logging events in the absence of any ...
1
vote
1
answer
157
views
How can I color code VS Code terminal logs for local dev only
Is there a way to have the logs in VS Code Terminal (not a log file) from running an application color-coded according to log severity? For example: INFO in white, ERROR in red, WARN in yellow.
I am ...
0
votes
1
answer
49
views
JUL Handler configuration in logging.properties
.handlers=<handler>
handlers=<handler>
What is the difference between these two configrations. What happend if only "handlers" is configured without ".handler"
I tested,...
-3
votes
1
answer
73
views
Propagating logging.logger from module to single log file [closed]
I have a python project with this structure:
Project-Root/
|-- script.py
|-- utils/
| |-- utils.py
| |-- init.py
My script.py looks like this - I import logging, setup an output file, import a ...
0
votes
1
answer
129
views
NLog 6.0.7 Multiple archives created in multi-process logging setup
I have a multi-process application (one orchestrator and multiple workers) where all processes write to the same log file using NLog 6.
The log file is configured to be archived:
daily (ArchiveEvery=...
Best practices
0
votes
4
replies
180
views
How to ensure an inserted row survives a rollback?
In SQL Server, I have a stored procedure that returns some sensitive data to the client, and logs that fact into a log table. The stored procedure is executed in a transaction controlled by the client,...
Best practices
0
votes
15
replies
6k
views
cout vs. fprintf vs. fputs
I design my utility function not to throw an exception, as I don't want to deal with exception and to be able to use this function in a while loop. I also try to follow all the best practices I've ...
0
votes
1
answer
96
views
Suppressing logs in Azure
I'm looking for help to suppress very annoying logging - something I am not getting about configuration.
In ACA Log stream I keep seeing these log entries:
2025-12-17T15:54:39.257462600Z 2025-12-17 15:...
Advice
0
votes
1
replies
57
views
In FusionCache how to change logging level depending on for how long Fail Safe is activated?
I got an requirement to configure logging in Fusion Cache (only L1), so that when fail safe is enabled and upon some factory issue we start getting stale values this fact is logged as warn. As this ...
2
votes
4
answers
263
views
Logging long running API or other call
I'd like to be able to make a call (e.g., to an API) from within an Azure function, and make a log entry if it is taking longer than n milliseconds, but not interrupt or end the call. Note this is not ...
1
vote
1
answer
128
views
PHP dependency injection and PSR LoggerInterface [closed]
I am missing some kind of best practice for implementation of PHP dependency injection and the PSR LoggerInterface.
Currently (without dependency injection) I have created my own LoggerFactory with ...
1
vote
1
answer
79
views
Configure module-level logger as child of main program logger
Python loggers can be organized in a namespace hierarchy (e.g. foo.bar.baz). If a python module uses the native logging module, can I configure logging in my main program such that all logging ...
0
votes
1
answer
165
views
Specific GCP Vertex AI IAM Permissions needed for enabling request-response-logging
I am following the instructions provided in Google's Log requests and responses documentation for enabling these logs.
We previously had Vertex AI Admin permissions set and enabling/disabling logging ...
1
vote
0
answers
118
views
How to parse an escaped JSON string into a JSON object and use it as an object in a specified field in Fluent Bit?
The logs received by fluent-bit(forward input)
{
"date": 1765435213,
"log": "{\"time\": \"2025-12-11T06:40:13+00:00\",\"tcpConnectionId\": \&...
2
votes
1
answer
546
views
How to reduce the logging of OpenTelemetry with ASP.NET Core and Azure web service
I have an ASP.NET Core web application running as an Azure App Service.
Recently I have noticed our costs for Application Insights has rocketed up. I think this might be due to upgrading to a newer ...
Best practices
0
votes
2
replies
52
views
How can I associate route policies with route templates?
If I define a LoggingRoutePolicy extending RoutePolicySupport , how can I associate it with routes that I have instantiated from a template?
public class LoggingRoutePolicy extends RoutePolicySupport {...
1
vote
0
answers
131
views
How do I get DuckDB CLI to successfully log errors?
I'm using the DuckDB CLI, version 1.4.2 on macOS.
The plan is to use duckdb as a part of a CLI pipeline, not from inside of a Python script, etc.
I've already got the tooling to build out the script ...
10
votes
1
answer
3k
views
CA1873 Evaluation of this argument may be expensive and unnecessary if logging is disabled
I'm in the process of upgrading to .NET 10 and I ran into to this compiler suggestion:
CA1873 Evaluation of this argument may be expensive and unnecessary if logging is disabled
It references to ...
0
votes
1
answer
100
views
Write Azure Container App logs to Azure Monitor
I am developing a console application which will run as an Azure Container App.
How do I write application logs such that they can be reviewed and monitored using Azure Monitor?
I have searched for ...
Best practices
0
votes
1
replies
114
views
java stream api: logging inside a stream
Disclaimer: The question below was met with quite a bit of critisicm. The only reason I did not delete this question is becasue stackoverflow doesnt let me after somebody reacted on it. Also the code ...
Best practices
0
votes
1
replies
54
views
Logger Configuration for Python Projects
I am wondering how I am supposed to setup a logger for python projects.
It makes sense that I can setup a logger for the main file in a project Example:
# main.py
logger = logging.getLogger('...
1
vote
0
answers
150
views
logging file is always empty
Here is a snippet of how logging is done in my test script:
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s %(message)s",
datefmt="%Y%m%d %H:%M:%S",
...
3
votes
2
answers
130
views
How do these 2 string buffers interact? Why does the internal logger buffer append to the buffer i dynamically allocate in main
So, for context, I have started writing a small HTTP-Server for learning purposes.
Currently, I have 2 modules: server and logger. The server module uses the logger I wrote internally for logging ...
1
vote
0
answers
80
views
How to log Headers or Cookies added to outgoing http-request by SocketsHttpHandler
I have a typed HttpClient, added to DI like this:
builder.Services
.AddHttpClient<IExternalApiClient, ExternalApiClient>()
.ConfigurePrimaryHttpMessageHandler(() => ...
0
votes
2
answers
226
views
Serilog Date Format using appsettings.json
I am having an issue formatting the date in the filename using the appsettings.json file for a C# worker service.
My current config looks like this:
Serilog": {
"WriteTo": [
...