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

1
vote
1answer
79 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
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
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
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
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
0answers
66 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
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 ...
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 ...
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
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?
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 ...
3
votes
4answers
121 views

What is your approach to debugging a transient problem [closed]

I am working on a system that controls a label printer and occasionally the label printer will print the same label 2,3,...,10 times. The error is transient, occurring once per 3000-4000 (once a ...
0
votes
2answers
190 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 ...
-2
votes
1answer
241 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 ...
4
votes
2answers
271 views

Is ok to leave untranslated advanced log?

I just had a little fight with my boss over this topic (well, the boss always wins so I will do what he wants to be done) but I'd like to have the opinion of others about this: We are making a ...
0
votes
1answer
108 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 ...
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 ...
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 ...
2
votes
3answers
229 views

How can I make my logging more useful? [duplicate]

I tend to find that after I build an application, the logs emitted by it become near useless and completely unparseable, and has the problem of being really verbose, while not outputting important ...
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 ...
2
votes
1answer
146 views

Logging in a latency sensitive system

Requirements: My application is latency sensitive. Millisecond level responsiveness matters. Not all the time, but when it acts, it needs to be fast. My application needs to log information about ...
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 ...
3
votes
3answers
171 views

how should I handle server error during ajax logout?

I need to write a handler for server error during user logout. What is a common practice? ajax.post({ url: '/auth/logout' }).done(function (response) { switch (response.statusCode) { ...
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, ...
37
votes
9answers
4k views

Do we need Logging when doing TDD?

When doing the Red, Green & Refactor cycle we should always write the minimum code to pass the test. This is the way I have been taught about TDD and the way almost all books describe the process. ...
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 ...
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 ...
3
votes
2answers
318 views

It is bad practice to hard couple logging interface/implementation with business model classes?

Should we avoid using logging in business model classes and try to move logging to service/controller classes? In for example java context, logging in model classes will hard couple the code with ...
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 ...
3
votes
4answers
957 views

When should a database table use timestamps?

First a note, I thought maybe this question belonged in the database exchange, but I think it is more broadly related to a programming solution as a whole than to databases. Will move to database ...
-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? ...
5
votes
4answers
320 views

Is it normal to write all logs into a single file?

Our teamlead said that many files much worse than a single, despite of we are working on a big project. He argued that our customers could more easily send logs to us if there will be just a single ...
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 ...
3
votes
4answers
2k views

Which design pattern is more suitable for logging?

I should log some events in a program but as far as I know it would be better to keep the logging code outside the program because it is not about the real functionality of the program. So may you ...
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} ...
3
votes
2answers
214 views

Verbose or concise logging [duplicate]

I was wondering how much data should be logged. I know this deeply depends on multiple factors. But it can still be hard to find the golden middle way. Lets say I have an application where people ...
0
votes
2answers
395 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 ...
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 ...
3
votes
1answer
83 views

An extensible logging architecture for Android?

The end goal is to have a variety of data sets that can all be graphically plotted against eachother. All data should correspond to a date, so that when plotted against each other, they show the ...
1
vote
1answer
797 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 ...
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 ...
3
votes
5answers
1k views

Is SQLite a sensible option for data logging?

I am trying to setup a small data-logging application under linux. The data arrives via serial port, and from there it should be pumped to logging and to graphical display. The logging functionality ...
-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
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 ...
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
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
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 ...