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

2
votes
2answers
286 views

When is it okay to log filename/line information for errors?

We have a closed-source commercial C++ application. Some of our logged error messages are in plain English like "ERROR: could not read file 'foo'". While others use a macro to print filename/line ...
2
votes
1answer
81 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 ...
2
votes
2answers
142 views

Where should tests' log files go?

My application has a rather non-trivial, yet standard, log configuration. It includes a console appender and a rolling size-based file appender. When I'm running the tests, thru the IDE or with ...
2
votes
3answers
83 views

Allowing the user to specify the location of a logfile

I'm working on an application, and adding logging, but now I'm stuck. I want to allow (not force!) the user to set the location of the logfile. Basically, my problem is: logger initialization ...
2
votes
2answers
928 views

Centralized and decentralized logging mechanisms

I've worked different kind of applications both having centralized and decentralized logging mechanisms. I feel centralized logging mechanism is good to see the proper flow of code and timing of ...
2
votes
1answer
467 views

tail-like view on HTML logfiles

I'm working on an application that creates HTML log files. I'm tired of having to manually reload and scroll to the bottom in the browser to see the latest entries. A solution that does not really ...
2
votes
1answer
312 views

What is the best way to track / record the current programming project you work on? [duplicate]

I have been in this problem for long time and I want to know how it's done in real / big companies project? Suppose I have the project to build a website. Now I divide the project into sub tasks and ...
1
vote
3answers
122 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 ...
1
vote
2answers
104 views

Logging events for reporting purposes

Are there any design patterns or best practices around logging events for use in reporting and BI systems. For example in a system which manages orders from a website, it would be beneficial if a ...
1
vote
3answers
244 views

Exception when logging exception: is it correct to ignore them?

My question is specific to php, but i think it can be useful in other languages. I log into a table all the exception a code can throw: try{ //Some code } catch (Exception $e) { $log = new ...
1
vote
1answer
85 views

Is there any reason not to include issue numbers in debug logs?

I was going through the answers to this question: What information must never appear in logs? And noticed that nobody mentioned this particular attribute. It's something I find useful- whenever any ...
1
vote
2answers
456 views

log4cxx: is it a stable option to include as part of distributed library? [closed]

We are porting our Java API library to C++. (Our target platforms are Linux and Windows.) Since we have minimal C++ experience, the learning curve has been pretty steep, but overall we have been able ...
1
vote
3answers
72 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 ...
1
vote
1answer
198 views

How to unit test a class which is just an adapter that logs input and output to a third-party library?

I have the following (in C#, but the question could also apply to Java): public interface ILibraryAdapter { string Property1 { get; } string Method1(string param1); ... } public class ...
1
vote
1answer
364 views

Logging in a distributed system

We have several application servers (and different applications) running on Amazon AWS and our main method of logging is a combination of statsd, carbon/graphite, and an alert system based off of the ...
1
vote
1answer
799 views

How to design a log() method that can easily be accessed from the outside of the Console class?

Recently my team has programmed a custom developer console in a video game which can easily be hidden or displayed, because it's more comfortable and less of a hassle. The Console class contains a ...
1
vote
3answers
94 views

Communicating details of method result?

I have code like this (pseudocode) foreach(Box box in boxes) { if(boxFilter.PassesFilter(box)) { // do something useful } else { Log.Log(format("Box %s was rejected", ...
1
vote
2answers
96 views

Logging page/session ID in an inner module

We have a C# ORM module that generates queries. It logs generated queries and other information into the error/trace file. It is used by our web application. Most of our queries are generated ...
1
vote
2answers
118 views

Strategy to store/average logs of pings

I'm developing a site to monitor web services. The most basic type of check is sending a ping, storing the response time in a CheckLog object. By default, PingCheck objects are triggered every minute, ...
1
vote
1answer
561 views

What factors should I consider when logging a (JSF) web-app?

I've recently read the article The Problem with logging and was wondering about my current logging strategy. Usualy I use Log4J in my projects and just have to decide which line/attributes I would ...
1
vote
3answers
804 views

Opinions on logging in multiprocess applications

We have written an application that spawns at least 9 parallel processes. All processes generate a lot of logging information. Currently we are using Pythons QueueHandler to consolidate all logs ...
1
vote
3answers
485 views

Logging asynchronously - how should it be done?

In many of the services I work on there are a lot of logging being done. The services are WCF services(mostly) which use the .NET EventLogger class. I'm in the process of improving these services' ...
1
vote
3answers
398 views

Maintaining log stream after file name change

I'm trying to log to a file and move it about every 30 seconds. I'm using the os.rename function (which I do from a supervisord process) in python to move the current log to a timestamped log (which ...
1
vote
2answers
234 views

Event based logging. Is it a good idea and is it ok to pass a handle to a “logged” object?

Hi I have fairly complex program that is doing computations in a quite large loop. I want to log some basic statistic about the run to be able to analyze its performance over time and vs loop number. ...
1
vote
1answer
126 views

Strategy for clients to retrieve real-time log from HTTP server

I have an HTTP Server Service application which has its own logging mechanism. It's written in Delphi. I would like to provide a way for multiple clients to connect to this service and get a real-time ...
0
votes
3answers
151 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
2answers
396 views

Is storing stack traces in database recommended?

The current system I am working on goes through a set of documents & performs some logic using the metadata of the document. If the metadata of a document is fishy..it throws an exception. The ...
0
votes
3answers
113 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
1answer
69 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
1answer
78 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?
0
votes
2answers
128 views

finding patterns into logs

I am trying to put together a way to figure out if incidents occurred based on log content. Typically, on log (or db table) would contain a list of transactions composed as follow: {Timestamp} ...
0
votes
1answer
148 views

Design patterns to avoiding breaking the SRP while performing heavy data logging

A class that performs both computations and data logging seems to have at least two responsibilities. Given a system for which the specifications require heavy data logging, what kind of design ...
0
votes
2answers
95 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
2answers
191 views

Way for java program to read file from when it was stopped

I am working on an application that reads a log file, looks for a specific string, sends alert emails and saves data from the file into a database. The reading functionality is working well, but I am ...
0
votes
1answer
109 views

How should I handle measurement logging in my Discrete Event Simulation engine?

I'm attempting to build a Discrete Event Simulation library by following this tutorial and fleshing it out. How should I handle logging metrics in my Discrete Event Simulation engine? If you don't ...
0
votes
1answer
35 views

Logging system interactions as a user vs as a flag

When running a site that has a CRM with a logging facility that logs users interactions (someone changing a name, address or user permission etc), is it better to log system interactions (automated ...
0
votes
1answer
81 views

debugging web applications using debug parameter

A suggestion has been made by a team member to leave all debug code intact in our web pages... and then to create a variable that can be turned on / off to enable / disable debugging. This is a ...
0
votes
1answer
266 views

processing Postfix log with python

I need to process all log messages from Postfix (/var/log/mail/mail.log), and print a summary/statistics (how many emails were sent/received and from/to which email addresses) The situation is made ...
0
votes
0answers
18 views

Monolog - retrieve the logged messages in a variable [on hold]

I looked into to monolog, and there are dozens of handlers that allow logging almost everywhere. What I didn't see is logging to a variable. What I mean is that I want the log messages kept in a ...
0
votes
0answers
64 views

What is the best way to implement a workaround for Log4J's DailyRollingFileAppender issue on Windows?

I understand that there is an open bug with Log4J 1.2.x because (apparently) the java.io.File.renameTo() function fails due to a OS lock on the log file, which causes the file not to be renamed. I ...
0
votes
0answers
67 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 ...
0
votes
0answers
35 views

How do I implement the OpsDB from Release It! by Michael T Nygard

I have recently been reading the Release It! book by Michael T Nygard.In the book he talks about Implementing an OpsDB to manage and record performance statistics of applications. Has anyone ...
0
votes
3answers
78 views

One Event Sent to Multiple Listeners, Want to Log Notification Once

I have a system in place where a Cache is made up of many Cache Nodes. When one is added, a CacheNodeAdded event is raised by the Cache. The Cache has a redundant set of Monitors listening for ...
0
votes
0answers
32 views

Offload traces into shared memory

There is a task to trace thread execution activity for posthumous analysis with minimum impact on latency/performance. Stack trace might be not enough to understand the reason of crash. Initially I ...
-1
votes
2answers
3k views

How to do logging in console application [closed]

I have a simple console application that will be deployed as a scheduled job. Below is its pseudo code Main(string[] args) { //get xml string from database Reports reports = ...
-1
votes
3answers
351 views

Good logging technique for small projects on Java [duplicate]

When I'm coding small projects, I often use System.out.println to print valuable info. It's simple, easy and gets me info. The only drawback I found is that there is no simple way to disable parts of ...
-1
votes
1answer
128 views

Who actually performs the task of log rotation?

I know log rotation is a feature seen in application servers like Oracle's Weblogic. I would like to understand: What is actually meant by log rotation? What is it useful? Who performs the task? ...
-2
votes
1answer
242 views

What is the best way to get a method name in runtime?

Here is a little background of my problem: I implemented a singleton logger class which is being called from several projects. I want to log the name of the class as well as the name of the method ...
-3
votes
3answers
307 views

What's the meaning of “the Sun defect” and how does it differ from the more generic “NIH syndrome”? [closed]

I hear people talking about the "Sun defect", often giving the whole mess around logging as an example. How is it different from the not-invented-here syndrome, which means uselessly duplicating ...
-3
votes
1answer
58 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 ...