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
2answers
87 views

Log-reading & String-matching with hashtable for fastest execution speed

I'm currently enjoying this exercise I'm working on for fun: I wish to write optimized code for the searching of particular strings per line in a (very large) file, counting how many exist, and ...
3
votes
2answers
51 views

Small library for logging to MySQL

I've thrown together a utility for my programs to log to a database, but the code looks like a mess and I don't know how to clean it up. This library is going to be used from all of my other programs ...
6
votes
2answers
54 views

Extensible Abstract Log Reader

My goal with the following code is to provide an extensible class that can be extended in order to read log files and transforms them into meaningful output. I'd like to have comments about the code ...
3
votes
0answers
112 views

Exception logger for servlets and JSPs

I hate using unnecessary catch blocks and I like to see my code look beautiful. In most of the cases in my project, which is a web application, I can't declare many ...
5
votes
1answer
91 views

Logging library for C

Over the past couple of weeks I have been working on a general purpose logging library for C in my free time. At the moment I have stabilized the API and most of the features I wanted to implement ...
4
votes
3answers
59 views

Loop through all virtualhost log files and run goaccess on each file

So I have multiple websites running under apache2 virtualhost - and I wanted to use GoAccess to process the access.log for each site. The directory structure is ...
3
votes
1answer
44 views

Changing cuts to sed for parsing dates from apache log (common log file)

Would switching my cuts below to SED improve performance? I am trying to get a per date count of requests for the last two weeks from a server log. The script runs, but slowly (comes in around 14 ...
3
votes
3answers
100 views

Cancelling an order with a side-effect of logging the operation

I have a data access layer method to cancel an order. This operation should have an associated "operation history" entry. My first (naïve) implementation looks like this: ...
4
votes
2answers
96 views

Wrapping around window.console

I'm working on an old application written in JavaScript. It's absolutely littered with console.* messages some of which are useful for development purposes. At the very least I'd like to switch these ...
2
votes
3answers
74 views

Simple Log Handler

I want every piece of feedback that is possible as I am new to Java. I've coded some C# before but not much. I want to be sure that I am following the guidelines of how to write and name Java ...
7
votes
0answers
114 views

Simple, encapsulated C++ logger that can deal with fork/exec situations

Motivation: for whatever reason, some of the available 3rd party logging libraries don't really deal with programs that get fork'ed/exectuted well. For instance, ...
1
vote
0answers
21 views

General application log

In my Node.js applications, I often find it helpful to have an application log so that should something go wrong in production, I can have more information than I get from a crash stack trace to track ...
23
votes
4answers
3k views

Someone thinks poorly of my server log parser

I have just been informed that the following code written by me is extremely poor. I have absolutely no idea why. It is memory efficient, and looks clean to me. But still the feedback is very poor. I ...
1
vote
3answers
351 views

Use of Exception to log execution stack trace

I've been back and forth with a colleague over the use of Throwable.fillInStackTrace. This Log class is meant to wrap the Simple ...
4
votes
1answer
56 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 ...
1
vote
1answer
77 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
171 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
102 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
181 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
103 views

Extensible logging - DatabaseLogger

Recently I wrote a logging API that features an ILogger interface. I wanted to extend my library with a DatabaseLogger ...
14
votes
1answer
114 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
399 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
50 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
78 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
96 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
47 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
74 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
69 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
111 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 ...
10
votes
2answers
548 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
90 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
796 views

Class for catching error and logging

I often write something like this in my code: ...
3
votes
1answer
73 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 ...
6
votes
1answer
164 views

Debug log wrapper

I will be adding functionality and most likely additional refactoring, however a stringent review would be welcome before I build it further. I know documentation is probably a bit sparse but, you ...
4
votes
5answers
200 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
444 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
405 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
95 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
914 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
730 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
436 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 ...
8
votes
2answers
4k 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 ...
6
votes
1answer
410 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
75 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
198 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: ...
27
votes
7answers
3k 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
315 views

How to chain exceptions?

I have some function like: ...
2
votes
1answer
44 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
242 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
226 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 ...