Questions tagged [logging]

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.

Filter by
Sorted by
Tagged with
4
votes
2answers
176 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
221 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 programs....
7
votes
1answer
723 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, ...
5
votes
1answer
85 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 ...
37
votes
4answers
4k 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 ...
6
votes
3answers
27k 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
266 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
384 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 ...
2
votes
2answers
4k 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 ...
4
votes
1answer
652 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 ...
11
votes
2answers
439 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 ...
13
votes
1answer
313 views

Extensible logging - DatabaseLogger

Recently I wrote a logging API that features an ILogger interface. I wanted to extend my library with a DatabaseLogger ...
23
votes
1answer
3k 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 ...
7
votes
2answers
4k 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 policy-based,...
1
vote
0answers
101 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
114 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). ...
4
votes
1answer
4k 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: ...
2
votes
1answer
106 views

Avoiding code duplication in multiple except blocks in Logger class [closed]

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 ...
3
votes
1answer
1k 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
758 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 host)....
2
votes
1answer
283 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 possible....
12
votes
2answers
5k 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 drawbacks,...
1
vote
1answer
522 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
2k views

Class for catching error and logging

I often write something like this in my code: ...
3
votes
1answer
93 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
397 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
214 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? ...
6
votes
1answer
3k 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
1k 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. ...
3
votes
1answer
166 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 ...
3
votes
1answer
727 views

Writing a log file with threads

Here are all the threads write the log file. I want to know if the below script is fine, if it needs any modifications, and whether I am utilising threads properly to execute this code quickly. <...
9
votes
1answer
508 views

Date range validation

The following code is ran when the user presses a button to generate a log file based on the date selected. The DatePicker has a restrictive selected date range of ...
0
votes
2answers
5k 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. ...
9
votes
2answers
6k 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
664 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 ...
21
votes
2answers
31k 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 ...
7
votes
1answer
1k 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
103 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
425 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: ...
38
votes
7answers
11k 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, ...
4
votes
2answers
11k views

Diving into Python sequences: analyze an access.log

As a first little Python exercise, I wrote an analyzer/summarizer for my nginx accesslogs. The code works fine but I'm not sure if I used the different types of sequences properly or made some other ...
8
votes
2answers
1k views

Overloading various logging methods

I got really tired of having this code in all of my classes and methods: ...
5
votes
3answers
2k views

How to chain exceptions?

I have some function like: ...
2
votes
1answer
137 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
308 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
574 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
154 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 ...
3
votes
1answer
82 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
1k 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 ...
3
votes
1answer
159 views

Filtering file for command line tool

I've written a little command-line utility for filtering log files. It's like grep, except instead of operating on lines it operates on log4j-style messages, which may span multiple lines, with the ...