Questions tagged [logging]
Computer data logging is the process of recording events in a computer program, usually with a certain scope, in order to provide an audit trail that can be used to understand the activity of the system and to diagnose problems.
269
questions
10
votes
8
answers
6k
views
What is the advantage of log file rotation based on file size?
I understand that log file rotation is changing the log file you used when (1) one gets big enough or (2) at EOD, but I'm not sure I understand the reason for (1). I have never had any issues with ...
1
vote
1
answer
166
views
Inheriting a logger
When you define a class, is inheriting a logger such as log4cxx a good design?
Assume I am defining a class called MyClass.
When I want a logger, I use a pointer to an abstract logger class as a ...
0
votes
0
answers
123
views
Approach for comprehensive data/activity logging
I would like to be able to build up a log of user activities, capturing data such as who they were, where they logged in from, what activity did they take, and what data did they change (both before ...
3
votes
2
answers
289
views
When to prefer print over logging?
Generally print statements are frowned upon in favor to logging. But are there any situations where I should prefer using print statements?
In a interactive command line application, if I ask for user ...
0
votes
1
answer
134
views
AWS and cron job: improve logging, monitoring and concurrence
In my company, we use a separate cron server to run mission-critical background jobs that run on a single ec2 instance: the whole platform is then vulnerable to anything going wrong on this instance.
...
-1
votes
1
answer
161
views
Should the logging utilities be exposed as public API?
In my library I've got a Logger class that is a wrapper around spdlog, that I use internally for logging. Logging is enabled by default in Debug builds and disabled in Release builds, moreover user ...
0
votes
1
answer
71
views
Best practices for storing logs from worker processes in Azure?
We have a .NET 6 application that consists of a REST API running in Azure App Service, and long-running background jobs hosted in Docker containers. These jobs are triggered by messages in a message ...
0
votes
1
answer
104
views
Logging, with optional foreign key cross reference
I am wanting to enhance a system to execute various background tasks (primarily data importation). In order to provide data for support, analysis and job status generally, I had been thinking of ...
22
votes
5
answers
6k
views
Should I use a global logging variable?
Over and over again we're told, "globals are bad" and with good reason. However, I'm working with a logger that needs to be accessible everywhere in the program. Why shouldn't I create a ...
0
votes
1
answer
392
views
Cheap But Effective Solution for Logging in a private rest microservices backend api
I've created a backend following a microservices architecture and now I need to implement logging.
my understanding
After reading some articles about this topic, I've listed below some "pretty ...
-3
votes
2
answers
88
views
Optimal variable-time logging of a real-time data stream
Cross-posted from stats stackexchange
Say I have a logging utility in my application that I use for recording timestamped diagnostic log messages. I want to add tracking of some performance metrics to ...
1
vote
1
answer
103
views
Should a LoggingHandler log?
I wrote a custom log handler that has a config file and uses a service on the network. Now I'm wondering if it should itself log.
Pro:
Everyone should log, it helps track errors, especially when you'...
4
votes
2
answers
2k
views
What log level should be used for an expected but (potentially) bad occurrence?
In my team we are currently building an API gateway, where the client can authenticate themselves with an API key. Naturally the authentication may also fail, which produces a message in the log.
...
7
votes
4
answers
4k
views
log levels and stdout vs stderr
I'm writing an app which uses a logger with different logging levels (info, debug, warning, error, etc.); but - I'm used to the idiom of writing program output to stdout and error information to ...
0
votes
2
answers
106
views
TL suggests that testing, refactor, and tool usage could avoid the need for verbose logging
Additional Context
I make infrastructure for automated device testing. Debugging can be very time consuming because the devices have many states and are constantly being updated with new builds which ...