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
7
votes
1answer
4k views

Basic Linux daemon

I'm looking at writing a simple proxy. At the moment I've got a logger, command line argument parse and simple daemon (it does nothing beyond logging). Next I'll be looking at starting the network-...
5
votes
1answer
4k views

Layered architecture implementation in a Java web application

I am trying to learn how to design and implement a layered Java web application with a presentation layer, service layer and the DAO layer. I have used the Struts 1.3 framework with Java JDK 1.6 for ...
10
votes
2answers
1k views

Filtering log files from a server

I have made a program in Python to do a filter of log files from a server. What I would like is some guidance on how this code could be optimized, streamlined or 'short-handed' so my 'pythonic' ...
0
votes
1answer
1k views

Print Java Object graph

Please share your comments and better ideas, to print java graph, which manipulates selected (@Mask) fields as XX, thus avoid logging confidential data, through ...
4
votes
1answer
38 views

Gives a live view to a changing file on server

I have a file on my server which contains a running output of a script. This file is constantly changing and fluctuates in size between 0 - 1Mb. Now I want to take this file and make it viewable from ...
3
votes
1answer
859 views

Web job logger implementation

Interface for logger: ...
5
votes
2answers
189 views

Logging/debugging for testing purposes

This is basically a logger which I use/wrote. It has convenient features like including one-line stack traces with print statements, making the text easier to find, and piping all output to either ...
7
votes
2answers
69 views

Monitor webserver accessibility inconsistencies

I have written a simple application to monitor whether a couple of Java EE 6 web applications deployed to Glassfish 3.1.2.2 are accessible. My intent is to demonstrate to our operations team that the ...
6
votes
1answer
63 views

Fixing logs that overlap

Here we trying to fix logs that have overlaps with each other. Am I doing it right? Is there any way to improve/refactor it? ...
6
votes
2answers
1k views

Logger module in child processes from os.fork()

I have had a hard time understanding all the documentation on the logger module and forking processes. My goal is to have each child process that's worked to write to their own separate log file. ...
1
vote
1answer
547 views

Configuring NLog

I have this method: ...
1
vote
2answers
200 views

Logging mechanism

I have the following code: ...
5
votes
1answer
263 views

NodeJS logging module

This code is for a NodeJS logging module. I created it because I wanted to find a way to log different type of things but not show them all at the same time. I also wanted to format the logs in a ...
10
votes
1answer
2k views

Try-except decorator for classmethods

This question is related to the Cactus Text Game Engine. For easy error handling in Cactus, we've put together this small decorator. Essentially, the decorator wraps any class method in a ...
2
votes
1answer
2k views

Logging and profiling - automatic logging through annotations

I am working with a little project intended to allow applications to benefit from aspect oriented programming. The first aspect is logging, which is already working. However I want this code to be ...
2
votes
1answer
61 views

Monitoring (i.e. loading updates) to log files

I wrote a simple little script, designed to load some log file. Clearing lines and loading updates is done by double clicking on the log line to clear. ...
2
votes
2answers
826 views

Email log parser

This code parses mail server log files and outputs statistics into an external file. Is there a way to make it more pythonic? Is it a good idea to use regex anywhere? Which libraries can reduce the ...
2
votes
0answers
299 views

ZF1 with Monolog

I am currently working in a Zend Framework 1 project. In the project we needed a sort of logging module, and Monolog was requested. Now since I'm quite a beginner with PHP, I'd like to know if I'm ...
2
votes
1answer
305 views

Custom error handler for PHP

I've written a custom Error handler for use in PHP. What it does is simply capture PHP errors, and logs them using Monolog. It works, but I can't help that it has too much stuff inside. I could ...
4
votes
1answer
1k views

Getting a list of all computer objects in each AD domain

So I wrote this script and although it does work I can't help but think that it can be more efficient with all the repetitive code. Can anyone offer any suggestions on making it fewer lines and ...
1
vote
0answers
56 views

Cross-browser UI-less replacement of console.log

I've written some integrated tool which allows to save the console.log output to a file. The point is that this tool forwards each ...
37
votes
1answer
1k views

Utility that decodes and logs UDP packets

I have written the following utility, as my first non-tutorial program in Go. The purpose of the utility is to connect to a torque/force sensor (aka load-cell) via UDP; to send an initialization ...
4
votes
2answers
1k views

Logging to a File vs UDP

I'm trying to understand where my ruby implementation of this fails and hoping for an expert to shed some light on this situation. I've tried to make this a very simple example with the idea that ...
7
votes
1answer
829 views

Automatic flowchart generator

I wanted to see graphically what my programme was doing so I wrote this automatic flowchart generator: ...
3
votes
2answers
478 views

A program to shred files

The following is a program to shred files securely: ...
4
votes
0answers
652 views

Multithread debug logger for Free Pascal / Lazarus

Debug experience can be much improved in the Lazarus development interface. Please, if you use this free development environment and have the same felling, do not consider this affirmation simply as a ...
2
votes
1answer
231 views

Logging of various exceptions in the callback

I am working on a library in which I need to execute my URL using AsyncRestTemplate and after that I will get a json response back if it is successful. I am also making ...
4
votes
3answers
648 views

Directory Snapshot

The following code creates a recursive backup of a directory in the form of interlinked HTML files, structured in the same form as the input directory. It does not take the backup of the contents ...
0
votes
1answer
712 views

Ruby singleton for logging

I currently have a logging setup that looks like this: ...
7
votes
3answers
4k views

A Simple, One-Page PHP Admin Login (with prepared SQL statements)

First off, I want mention that this code works well. This is more of a request for suggestions... We're attempting to program a one-page, recursive, token-based admin shell that is safe from ...
8
votes
5answers
4k views

Custom Logging Class: Efficiency

I wrote a logging class for several of my applications, but I have noticed that it is fairly in-efficient. Can anyone suggest improvements? What I am looking for: Pointers on improving efficiency ...
1
vote
1answer
102 views

Logging errors with the same exception type

I wrote some code which simply retrieves the HTTP status code of the passed in URL. There are multiple potential causes of the same error. I am hoping to get some all around feedback on this code, ...
3
votes
2answers
456 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
135 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 ...
22
votes
3answers
3k views

Parsing log files of HearthStone: The log reading API

I'm still working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show ...
6
votes
2answers
186 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 ...
4
votes
2answers
3k views

Updating list of string while other threads are reading from it

I have a logging solution that writes down the hashes of messages. I consider some of these hashes to be safe and I want to skip logging those. I have implemented a whitelist that is a directory ...
4
votes
0answers
571 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
348 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
963 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
102 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 ...
4
votes
3answers
198 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
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
217 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
722 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
84 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
264 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
383 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 ...