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.

learn more… | top users | synonyms

3
votes
3answers
59 views

Should we reuse web app logs for user behaviour analytics?

Our web app generates a large amount of logs. These logs include both events regarding background operations in the app (data arrives from the server, ajax failures, inter-component communication, ...
0
votes
2answers
81 views

Should I log errors in the function they occur? or pass them back and log them when control returns?

One of the things I love about Go is how they encourage passing errors as return values, but when it comes to logging what is the most maintainable solution: passing the error as far back down the ...
2
votes
0answers
49 views

Log with Application Insights only (NLog vs AI) in Asp MVC

I was going through several blog posts and stackoverflow and programmers and I am still a bit confused. You can install NLog (or some other logging lib) and start logging quite fast and then you can ...
12
votes
6answers
317 views

Should I log errors on exception throwing constructors?

I was building an application for a few months and I come to realize a pattern that emerged: logger.error(ERROR_MSG); throw new Exception(ERROR_MSG); Or, when catching: try { // ...block that ...
0
votes
0answers
25 views

Logging of sent/received emails within a web application

We're finally migrating our client/server system to the cloud and would appreciate help on the handling of email within the webapp. Currently we monitor the inbox/sent items of Outlook. It seems that ...
1
vote
1answer
80 views

Are there any arguments for using a local logger variable

PMD Rule LoggerIsNotStaticFinal: In most cases, the Logger reference can be declared as static and final. I seem to remember some arguments for using local variables for logging, but cannot ...
1
vote
0answers
22 views

Most suitable solution for logging traffic to external services - ASP.NET

My application relies on several external services - labelled Service A, Service B and Service C in the diagram. I am looking at ways of logging the number of requests made to these services, and the ...
5
votes
4answers
354 views

Design pattern for wrapping logging around execution

Introduction I am implementing a abstract Java class of a processing framework*. By implementing the function execute, I am able to add business logical functionality. I would like to add logging at ...
2
votes
2answers
196 views

Adding centralized logging mechanism to Project (Best Practice)

I want to add a logging mechanism to my project but I am afraid to have logging code spread all over the place. I thus had the idea of having only one class Logger responsible for writing relevant ...
1
vote
4answers
143 views

Better way of handling pre conditions and logging

1. Imagine you have the following: void Foo::doFoo() { if (!isConditionValid()) { log("doFoo not possible because condition is not valid"); return; } if ...
0
votes
1answer
39 views

Should I try to read user input for logger data?

Our logger data has gotten a bit out of hand, so I am trying to find ways to trim out unnecessary log information. What I've found is that the programmer who implemented the logs (no longer working ...
1
vote
0answers
332 views

A way to trace each sqlite query

I've got big and hairy app with sqlite via dbi (from .c) as a backend - plenty of select/insert/update/delete queries. From looking through documentation I did not found a way to log all the queries ...
1
vote
0answers
116 views

Approach for polyglot logging

I'm building a desktop app with a Java front-end and very performance critical Fortran libraries. We've recently started pushing more of our code out of Java and into Fortran (see below) Soon we will ...
-1
votes
2answers
98 views

Should client side have a log? [closed]

The client side of my application is written in VB.Net, it accesses a java server. Server logs every request that was made by client, client shows every exception to the user (with an option to send ...
2
votes
1answer
86 views

Module level logger function

I've recently been assigned to a new project because I'm one of the only developers at my company who has used Python extensively in the past. My first task was to clean up the code base and make it ...
1
vote
3answers
85 views

Event logging: record a whole message, or a list of properties and generate?

I've written a simple event logging system, which I write to with a function similar to: void IIncidentLogic.ReportIncident( string code, string noun, string hostname, DateTimeOffset ...
11
votes
3answers
734 views

Why create a Logger object instead of using static logging methods across an application?

Taking an example of a simple Ruby on Rails application. It creates a Logger object during application load process: # in environment.rb config.logger = Logger.new(<STDOUT | file | whatever>) ...
0
votes
1answer
56 views

Logging private data

In general, I write a debug log whenever one of my functions is entered, including the parameters. For instance: function execute_query($query, $conn_string) { ...
1
vote
1answer
528 views

Is Logger.getLogger(MyClass.class) the best way to initialise log4j loggers?

This Mkyong tutorial suggests intialising loggers this way: @Controller public class WelcomeController { private static final Logger logger = Logger.getLogger(WelcomeController.class); // ...
2
votes
1answer
50 views

log method calls per object

How to log method calls on a per object basis for a particular class? I.e. after instanciating a = myClass() I somehow want to keep a log for what methods have been called on a like a.reverse() ...
4
votes
2answers
128 views

Strategies to analyze collected exceptions

We want to add error feedback to our application. I had a look at existing solutions (e.g. raygun.io), but these work "in the cloud", which is a no-go for us: most installations of our application ...
3
votes
2answers
242 views

Is it still a good practice to log parameters and returns?

Just a context, I am currently making a base code for a Java Spring Boot Application. I am currently setting up the logging of the application and I stumbled upong this url and found it helpful. ...
18
votes
6answers
4k views

Why does the TRACE level exists, and when should I use it rather than DEBUG?

In Log4J, Slf4J and a couple other logging frameworks in Java, you have two "developper" level for logging. DEBUG TRACE I understand what DEBUG do, because the explanation is clear. The ...
1
vote
0answers
113 views

How to to log clicks for a Pay-Per-Click software?

Let say you have a Website with advertising, and each time a user clicks on it, you want to charge an advertiser the amount he bids (basically, a pay-per-click system, like Adswords, with a different ...
0
votes
0answers
94 views

Is Python Logging in a WSGI application a best practice a production environment?

I am trying to log my webpage access to a database. It is a requirement. It seems to be a difficult thing to do outside of Windows IIS, and I do not wish to use Python with IIS. My options seem to ...
4
votes
3answers
790 views

Write progress from a long running process

We have some long running processes which could run for as long as an hour up to 6 hours. Some of the processes are started by hand and the user wants to see what the progress of the process is. ...
14
votes
6answers
3k views

Is logging next to an implementation a SRP violation?

When thinking of agile software development and all the principles (SRP, OCP, ...) I ask myself how to treat logging. Is logging next to an implementation a SRP violation? I would say yes because ...
1
vote
1answer
46 views

Loggers - Functional, non-functional or layered?

We use different loggers to break up and apply specific rules to different kinds of log data. We typically specify which logger to be used with something like this: var logger = ...
1
vote
2answers
274 views

Adding Logging to a pre-existing Program

I have a game that I have been writing in java as a hobby for a number of years. I have very sparse logging, just some simple output when something goes really wrong. It's about 25,000 lines of code. ...
1
vote
2answers
141 views

Logging function names on systems with few (memory and space) resources

Our logging module has a buffer that often gets full and we are searching for a solution to shorten our logs, without making any compormise in performance. The code is written in C++ and currently we ...
2
votes
5answers
382 views

Exception handling and 3rd party library [closed]

I'm currently having an issue with a 3rd party control library provider. They have an exception occulting culture that gets in the way of my general fail-fast approach when developing software. An ...
0
votes
3answers
705 views

Convention for logging within nested try catch blocks

I've looked at this question but it doesn't really help solve my dilemma. System 1 calls system 2 within a try catch, the method in system 2 has it's own try catch, which sadly handles an exception ...
0
votes
2answers
44 views

How do we sequence logs from different services in a system?

So, if I am designing a system as a set of different roles (client, app-server, backend services 1 to n). Each of these roles will have their own logging mechanism. I can aggregate all the logs at one ...
2
votes
2answers
176 views

Exception messages and event logging - which tense to use? [closed]

Do you have best practices regarding to which tense to use in message when you're coding exception-throwing or message-logging code: "Could not acquire connection from DataSource" versus "Can not ...
0
votes
2answers
232 views

Printing to out vs Logging, given the nature of this app?

I'm writing a command line application in Java. That app will scan a list of remote resources, do several attempts to access those resources, report failed attempts, and if succesfully accesed, ...
0
votes
1answer
168 views

Tracing and Logging per item instead of per application

I'm building a service in .NET that process "things" in the background and I'd like to trace the execution of these things per item, not per application. Most logging frameworks (I'm familiar with ...
7
votes
1answer
1k views

Log to file or to database table?

I'm developing a web application which uses MS SQL for various data: including users, user accounts, user licenses, license prices, invoices. I need to log users' real-time usage of the system, and ...
3
votes
1answer
175 views

Should I put logging in common shared libraries? [duplicate]

Should you add logging to common libraries that are used in many applications? For example, if I have a parser that's used in multiple apps, should I add logging inside the parser? My concern is that ...
8
votes
2answers
670 views

How should I handle logger failures?

In several of our company's applications, we use a custom logger. It's fairly robust, though we may replace it with something like NLog in the future. One of the logger's tasks is to log any ...
-1
votes
1answer
89 views

“Grep” that highlights instead of filter [closed]

I was wondering if there is a program in the common unix toolset such as grep that instead of filtering the lines that contain a string, simply outputs the same input but highlighting or coloring the ...
3
votes
1answer
208 views

Is console logging inappropriate for chatty applications?

12 Factor states that applications should log to the console, those console logs should should be unbuffered, and the logs should be redirected to someplace useful (file, database, whatever). But ...
0
votes
1answer
140 views

What possible things to log in mvc webapp [closed]

I'm about to learn to handle logging in my c# asp.net mvc app and are going to store my log in a noSQL-db. How to handle the logging is done. The thing is I'm having a hard time to figure out possible ...
0
votes
3answers
156 views

Store an object's name in the object or externally?

I'm in the process of building an application which needs extensive logging of points in time at which certain events happen. For example when it renders a sequence of different shapes to the screen ...
0
votes
3answers
233 views

Alternative to printing debug information to stdout\stderr [duplicate]

I currently have a long running application on an embedded Linux environment and all debug messages are currently being outputted to stdout using printf. This isn't ideal for special users who ...
0
votes
0answers
75 views

Design Logging (or: notify) architecture in application [duplicate]

Update: I edited my question to make my intentions more clear. So I think this question about logging will be different to the often asked questions. First things first: I have an application that ...
-3
votes
1answer
154 views

Distinct Log and Trace for each object in .NET [closed]

I am dealing with very complex objects in .NET (in my case a finite element model that can consist of thousands of other objects say a Model instance have a large list of Element instance). I would ...
1
vote
3answers
93 views

Logging instance information in Exceptions

During development on a large existing codebase I've started to capture variable values in my Exception logging. For example: public int Foo(int a, int b) { int returnInt; try{ returnInt ...
0
votes
2answers
357 views

Logging Exception in multi-tier application

I'm building a multi-tier enterprise application using Spring. I have different layers: Controller, Business and Provider. Within the application I've built a custom error handling mini-framework that ...
0
votes
1answer
118 views

Why do a lot of logging frameworks provide individual methods instead of a enum 'level'?

I see some of the more preferred logging frameworks like log4j, log4net etc all use 'trace, debug' etc methods. Why do they use these instead of methods that take something like a enum level?
1
vote
3answers
139 views

Log within try-catch or after? [closed]

Should one log success of an operation within a try-catch-block, or after it? Example: try do x log('successful') catch log('fail') end or is this better: try do x catch ...