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

4
votes
1answer
25 views

Logger class for MVC Framework

I have created a logger class for my own framework. Now I am trying to identify the components which can be done in a better way. The logger class doesn't log anything inside a file but it logs the ...
0
votes
1answer
30 views

Parsing log files in Haskell

I am working through the online materials for CIS 194, a upenn haskell class (not taking the class). This exercise is to parse an error log, and it gives a few function signatures to implement, ending ...
1
vote
2answers
59 views

Logger facade code for configuring multiple loggers are runtime

Following is the code for a logger facade that I have created, which can be used to log via any of the standard and configurable loggers like log4net, BitFactory, currently I have just integrated ...
2
votes
0answers
39 views

Text parsing and calculator (calculate Java heap memory)

I'm writing small tool, which must execute jmap -heap, write output to log, then takes some data from log and calculate used memory. I added some ...
10
votes
2answers
158 views

LogManager Tests

I should have started with this code. I wrote my logging API without writing unit tests, and since I recently wrote an automagic unit testing API I though I might as well go ahead and use it. So I ...
11
votes
1answer
92 views

Extensible logging - DatabaseLogger

Recently I wrote a logging API that features an ILogger interface. I wanted to extend my library with a DatabaseLogger ...
13
votes
1answer
89 views

Extensible logging

Whenever I need logging functionality in .net, I use a logging framework, such as NLog. Obviously there's no logging framework for vba, at least none that I know of. As much as I love using NLog, the ...
6
votes
2answers
139 views

Policy-based, variadic logger class in C++

I've been exploring design based around some of the more advanced C++11 features lately, and some of them are turning out to be rather useful for some projects I'm working on. One is this ...
1
vote
0answers
41 views

LogParser function: kill application and send email

I've created a new tool, which parses a specified log file, and if an Oracle exception is there, it kills Tomcat and sends an email notification. I tried to take into account comments from my ...
3
votes
1answer
67 views

TaggedLogger - Log wrapper

I wrote this class in order to not having to write tag every time (because of code duplication and risk of typos). ...
3
votes
1answer
51 views

How to better indent multiline strings with many string formatting args?

I have a function, that is used in flask, for logging application errors: ...
3
votes
1answer
45 views

Avoiding code duplication in multiple except blocks in Logger class

Context: A logger records events which contain an area, a level, a message and an option indicating that the source replaces another one. The logger attempts to send the message through HTTP, and on ...
2
votes
1answer
55 views

Deferred log file close

My code works in that it compiles, and when executed writes out a log file using a buffered writer. But I wonder whether: I am correct in assuming that this actually winds up deferring a ...
1
vote
1answer
57 views

Proper way to log progress and resume in Python

I often have a need to log my progress when doing a repetitive task. Logging allows me to continue where I left off if execution is halted (for example, perhaps my VPS server was rebooted by my ...
2
votes
1answer
86 views

Apply Good Patterns about Logging in Executor Process

I have source code for execute a command (ProcessStart) using Impersonate, and I want apply best practices and good design pattern, and good performance if ...
8
votes
2answers
154 views

Logging strategy setup

I finally set up my logging infrastructure to work as desired, however I feel like I had to do quite a lot things just to fulfill a few requirements. Now I'm worried if my approach has major ...
0
votes
1answer
51 views

Logger module with JavaScript

I'm new to JavaScript, and in Java I probably would do this as a singleton. I need something that I can call from anywhere and instantiate only once. This is what I have done, but I need some advice ...
5
votes
3answers
762 views

Class for catching error and logging

I often write something like this in my code: ...
3
votes
1answer
70 views

User-logging authentication

I'm little frustrated because I don't know how well I can refactor this script. I wrote the authentication function but it's too complicated, maybe too large in one function, and seems like spaghetti ...
4
votes
5answers
195 views

Is there a better version for verbosing the output of the euclidean method?

Here is my implementation of the Euclidean Algorithm. My question is how to make it more "professional". It's working right, but isn't this too newbie? ...
5
votes
1answer
301 views

Multithreaded file downloader using threading and signals

This is my first attempt to write a multithreaded application that downloads files from internet. I am looking for improvement in code, logic and better strategy for implementation. Please ignore the ...
3
votes
2answers
235 views

Apache log4j in play framework

I have converted this code from Java to Scala, and I need reviews. This works fine, but I am sure that something is wrong with this coding pattern. ...
2
votes
0answers
86 views

Parsing a website

Following is the code I wrote to download the information of different items in a page. I have one main website which has links to different items. I parse this main page to get the list. This is ...
1
vote
1answer
475 views

Async Log4net logging handler - High CPU usage on async call

I've got a LoggingMessageHandler that incoming requests on my WebApi application filter through. ...
7
votes
2answers
322 views

Creating a better NSLog

So, generally when I write iOS code, I will start with a lot of calls to NSLog, which is a macro that with print the string you send it to the console. There's a ...
11
votes
3answers
411 views

Pretty way of keeping sensitive info out of a logged command string in Ruby?

I have a long command that I am building with shovels (<<), with the intention of eventually running system(command). I'd ...
5
votes
2answers
1k views

Windows keylogger in C

I have had this keylogger code for a while now (a few years*), and I figured I would put it up for review. Here is what I would like reviewed (in order): Portability - right now, this program can ...
5
votes
1answer
271 views

C++11 Logging Architecture

To create a Logging system for a larger application, I came up with the following draft. The log sinks aren't detailed yet, but the factory method for logger creation and a rough draft of the logger ...
3
votes
2answers
72 views

How in-depth should the logging be?

This question is more-or-less code agnostic. Provided code analysis would be helpful though. Background: I've never got along with logging too well - probably because I've never had a need to review ...
5
votes
3answers
151 views

StoredErrorWriter

Functionality that overwrite standard error message with trace to user friendly message with error number stored in DB. Not yet completed some stuff with trx... Please review this. DB table: ...
26
votes
7answers
2k views

Logging without Code Bloat

I was wondering if any of you know any best practices 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, ...
5
votes
3answers
198 views

How to chain exceptions?

I have some function like: ...
2
votes
1answer
43 views

Loop filling a set with logging

After watching Raymond Hettingers talk Transforming Code into Beautiful, Idiomatic Python I got back to a function I wrote. I'm not quite sure how to make it more pythonic but I think this might be a ...
3
votes
3answers
228 views

Any recommendations to improve this logging framework? Or is it overkill?

So I've been kind of irritated with my logging recently as I find myself copying and pasting the same kinds of generic messages around to lots of different methods or retyping them ever so slightly ...
1
vote
1answer
186 views

Is it feasible to create a syslog server which writes to a client dataset?

I'm creating a simple syslog server in Delphi XE2 using Indy's TIdSyslogServer. I've decided to make it dump into a ...
5
votes
3answers
75 views

log4j 1.2 - own check for verbose logs?

In my code's package, I have a flag such as: public static final boolean LOGS_VERBOSE = false; And in worker classes (multi threaded ...
2
votes
1answer
59 views

Simplest WP7 logger

Just ended up with this approach for wp7 (no tag yet), in case someone would find it useful. Also, improvement considerations are welcome. It works with ...
5
votes
1answer
498 views

Review Simple Logparser

This is my first try with Python. I wanted to parse some Log4J so I thought it a good opportunity to write my first Python program. The format of the logs I deal ...
2
votes
2answers
90 views

Bash log monitoring optimization

I've made a Bash script to monitor some server log files for certain data and my method probably isn't the most efficient. One section specifically bugs me is that I have to write a newline to the ...
3
votes
2answers
3k views

More Elegant Solution to Logging Class

I got this class in C# which works fine. But I was wondering if there was a more elegant solution to what I am trying to do. It looks rather clumsy and inefficient for a Logging functionality. The ...
3
votes
1answer
89 views
1
vote
2answers
338 views

Encapsulating logging and throwing exceptions into a method. Bad practice?

original code example ...
2
votes
2answers
138 views

Wrapping an Exception with context-management, using the with statement

Before I try to make this work, I wondered if anyone had tried this, whether it was a good idea or not, etc. I find myself doing this a lot: ...
4
votes
3answers
946 views

Running over a log file to extract log times

I need to run over a log file with plenty of entries (25+GB) in Python to extract some log times. The snippet below works. On my test file, I'm ending up with roughly ...
4
votes
4answers
283 views

Little log engine in C

I programmed a little log engine in C I plan to use in my project and maybe some others in future. I am very novice C programmer and would like to have feedback of some experienced ones on this. It's ...
1
vote
1answer
242 views

localStorage functions for website shopping cart

As part of a larger web app we are producing, I was asked to help build functionality to tie a page's shopping cart into localStorage for persistence. What follows ...
1
vote
1answer
46 views

Checking for a logged user

I have two classes with similar first checking codes, but different behaviors. I suppose there is a way to refactor the code, so I don't need to retype it every time. Is it possible to refactor this, ...
0
votes
2answers
5k views

ASP.net proper login - logout classes - control login status

Would you have any suggestions improvements for the below functions classes ? Ok here how do i make a registered member login ...
2
votes
5answers
213 views

Logging input and log file strings

This is a piece of C89 code testing a function titled logging_function(), which takes two arguments and uses them to log a bit of information. In this case, the ...
3
votes
1answer
136 views

Logging system safety

I've created a logging system with one-use passwords (sent via SMS API). What I would like to know is if it's "safe". I know it is hard to estimate safety but I am curious if it is safer than regular ...