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

0
votes
0answers
12 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
1answer
72 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
votes
0answers
32 views

Using tar or zip format to store, retrieve, and delete files [closed]

I am looking for a solution to the following problem and wanted to get ideas and opinions from the community. I am implementing an HTTPLogger inside a logging framework. We are adding this as a custom ...
2
votes
3answers
152 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
60 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
106 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 ...
5
votes
5answers
919 views

Rules and advice for logging?

In my organization we've put together some rules / guildelines about logging that I would like to know if you can add to or comment. We use Java but you may comment in general about loggin - rules ...
0
votes
0answers
32 views

Logging without Code Bloat [migrated]

I was wondering if any of you new any best practises or design patterns so that I can have good logging in my programs without them looking messy or bloated. I am currently using C# and NLog however ...
1
vote
2answers
59 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
77 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) { ...
37
votes
9answers
3k 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. ...
3
votes
2answers
206 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 ...
1
vote
1answer
81 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
20 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 ...
0
votes
1answer
72 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
265 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 ...
4
votes
2answers
463 views

Log design approach

Logging was always a nightmare for me! Now I have to implement it again for a proxy system. In this proxy application, some systems ask proxy system to call some other services. What I have to log is ...
-1
votes
1answer
102 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? ...
0
votes
2answers
102 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} ...
5
votes
4answers
302 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 ...
3
votes
3answers
637 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
1answer
122 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 ...
42
votes
9answers
3k views

What are some patterns and anti-patterns of application logging? [closed]

I recently had to investigate a field issue for our large enterprise application. I was horrified by the logs that I had to comb through in an attempt to find the problem and at the end of the day the ...
3
votes
2answers
152 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 ...
2
votes
2answers
135 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 ...
0
votes
2answers
222 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 ...
3
votes
1answer
67 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
402 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
222 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 ...
1
vote
5answers
598 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
2k 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
255 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
217 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
2answers
285 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 ...
12
votes
6answers
1k views

What's the best way to manage error logging for exceptions?

Introduction If an error occurs on a website or system, it is of course useful to log it, and show the user a polite message with a reference code for the error. And if you have lots of systems, you ...
-1
votes
3answers
266 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
vote
1answer
83 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
203 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. ...
2
votes
3answers
118 views

Forcing logger/appender to output line logged at lower than its current level?

Consider the following scenario: I am writing a Dispatcher Servlet that delegates processing to various handlers depending on the request URL; the handler objects having previously registered ...
3
votes
3answers
601 views

C++ log every function and parameter values

I want to log every function call and parameter value in my C++ app. Is there a generic approach for this task ? (3rd part library, VAR_ARGS etc.)
3
votes
2answers
1k views

Design pattern for logging changes in parent/child objects saved to database

I’ve got a 2 database tables in parent/child relationship as one-many. I’ve got three classes representing the data in these two tables: Parent Class { Public int ID {get; set;} .. other ...
1
vote
1answer
129 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 ...
15
votes
8answers
1k views

Recommendations for .NET Logging components [closed]

I'm looking for a really good and light .NET logging component. I've used Enterprise Library and do like it but it's a bit heavy if you don't use other components in the collection. I've recently ...
15
votes
6answers
31k views

Why doesn't “object reference not set to an instance of an object” tell us which object?

We're launching a system, and we sometimes get the famous exception NullReferenceException with the message Object reference not set to an instance of an object. However, in a method where we have ...
5
votes
2answers
202 views

Is it fine to use logs in the Helper Methods?

I have been doubting for a long time whether or not to have a logger in methods (usually helper methods) like the one below. Whether we can print it in the method or print the response where the ...
0
votes
1answer
402 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 ...
0
votes
1answer
129 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 ...
1
vote
3answers
634 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
1answer
110 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 ...
14
votes
4answers
3k views

What is the correct way to handle debug output in Java?

As my current Java projects grow bigger and bigger, I feel a likewise growing need to insert debug output in several points of my code. To enable or disable this feature appropriately, depending on ...