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
47 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 is possible. Too, I want use good Logging ...
3
votes
0answers
36 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
25 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
742 views

Class for catching error and logging

I often write something like this in my code: ...
3
votes
0answers
46 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
192 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
243 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
118 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
75 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
157 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
187 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
397 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
500 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
180 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
64 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
124 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
158 views

How to chain exceptions?

I have some function like: ...
2
votes
1answer
40 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
217 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
151 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
73 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
56 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
310 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
84 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
2k 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
85 views
1
vote
2answers
280 views

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

original code example ...
2
votes
2answers
115 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
920 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
248 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
162 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
44 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
4k 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
205 views

Does this code contain any hidden bugs, performance issues?

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 first argument to the function is the ...
3
votes
1answer
135 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 ...
4
votes
1answer
346 views

How's my approach to logging?

I was surprised that I didn't find this approach to logging anywhere while reading up on the subject. So, naturally, I think I may be doing something wrong. I set up some simple tests, and this seems ...
3
votes
2answers
1k views

Robust logging solution to file on disk from multiple threads on serverside code

I have implemented a socket listener that runs on my Linux Ubuntu server accepting connections and then starting up a new thread to listen on those connections (classic socket listener approach). ...
20
votes
2answers
20k views

How to redirect a subprocesses output (stdout and stderr) to logging module?

I'm working on a Python script and I was searching for a method to redirect stdout and stderr of a subprocess to the logging ...
5
votes
4answers
859 views

How do I improve this logging mechanism?

There are quite a few things I am considering: I will have to check for null values I will have serious trouble persisting it in the database. How do I improve ...