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
1answer
55 views

A modern and extensible C++14 logger

I recently wrote this C++ Logger API code for a game engine. It needs to be as fast as possible so I tried to postpone everything to compile-time using different template meta-programming tricks (for ...
4
votes
1answer
19 views

Strip a newline and add more text to a Go bytes.Buffer

I wrote a little timer middleware to append the request duration to the end of the log message returned by the excellent Gorilla Toolkit's CombinedLoggingHandler ...
5
votes
2answers
91 views

Proper separation of concerns for stateful logger

This is a code review for a set of loggers following this question. The project is a universal windows application targeting Windows Phone. There are concerns over the tight coupling between the ...
4
votes
1answer
49 views

Log file mechanism

I want to create a generic log file which I can easily reuse in multiple files. Also, I want to be able to use the versatile std::cout so I can easily write ...
3
votes
0answers
70 views
+50

subprocess with logging module: tee with StringIO

I've got a long-running process. Once it finishes I need the output. But the user should be informed as its running. With the logging module I get timestamps and ...
2
votes
2answers
94 views

A generic logger in modern C++

I've created a simple logging system that I'm planning to use and I've tried out some modern C++ features to make it generic. First I've made a log class that represents a single log message: ...
8
votes
1answer
114 views

Simple log writer class

I've written a simple log writing class. My code is also hosted on my Github. Specifically, I am looking for criticism on these items: Resource management. What is a more correct/safe way to ...
1
vote
2answers
82 views

Logging all API call traffic in Java servlets

We have a few servlets like the one below, taking JSON request and produce JSON response. And the requirement is to log all API call traffic. ...
1
vote
1answer
171 views

Spring AOP Log4j Logger example, improvement

I went through some of the stuffs on net regarding spring AOP and wrote a Spring AOP logger. Can you guys check my code and give your valuable inputs to improve it or if it is not proper, give me an ...
3
votes
0answers
37 views

Reading log file of subprocess

I run subprocesses with lot of output (compilation of Unity 3D projects). I use log parsers to find known issues. ...
4
votes
2answers
35 views

Process monitoring script

I wrote a script which logs memory usage of a process (pid in file), and reacts in case a limit is reached. I run the script nightly. In my case, the process concerned propably has a memory leak and ...
1
vote
1answer
71 views

Logging System - Follow Up

Previous question: C# Logging System I have took your answers on board and added the following changes to my LogManager.cs class: ...
3
votes
2answers
199 views

C# Logging System

I created a small logging class library and wanted you guys to check it out, I used to use Log4Net but thought I could create something more user friendly that was more suitable for my project than ...
8
votes
1answer
142 views

Log sorting program

This is my first ever program written in Rust (after reading the book). It is small tool to sort all lines from stdin according to two criteria. First one is time ...
2
votes
1answer
73 views

Arduino weather station logger

I made a program that uses the Adafruit pressure sensor, and the DHT22 temperature and humidity sensor to log pressure, temperature and humidity every 30 minutes. I left it outside my house overnight ...
1
vote
1answer
60 views

Android log in file for testing purpose

I have created a method which shows log in logcat and also writes into the file. Every time this method is called it appends String in file. There are so many read/write operations on disk/non-...
4
votes
4answers
386 views

Recurrence, recursive function

Type a number \$n\$. Then calculate \$f(n)\$, where $$ f(n) = \begin{cases} n-10 & \text{if}~ n > 100\\[1.5ex] f(f(n + 11)) & \text{otherwise} \end{cases} $$ The output must show all the ...
3
votes
2answers
52 views

Counting unique visitors in access log

I'm aware I am probably reinventing the wheel somewhat here, but I am trying to teach myself simple bash coding by completing simple tasks such as parsing files. To that end I am looking to learn ...
2
votes
1answer
60 views

Generating INSERT query from parameters

I use NLog everywhere and I really don't like writing the inserts everytime. You need to write the same variable three times: two for the insert and one for the parameter for example: ...
13
votes
1answer
199 views

Ambient Context

What do you think about this way to make logging available across the application without passing log object around? Let’s say we have something which allows us to ...
2
votes
2answers
72 views

Simple logging library in C

This header implements a very simple set of C (only) functions for logging. This is part of a larger collection of utility functions aimed to be used during the development process, meaning that they ...
5
votes
1answer
78 views

Python logging handler

I'm working on a logger that has a name of the module that called the logger (when I create an instance of a logger in my program, I call LoggingHandler(__name__)) ...
3
votes
1answer
110 views

Class of file uploading to S3 using boto with multipart supported

I'm writing an app by Flask with a feature to upload large file to S3 and made a class to handle this. I have some targets in writing code: Code must be easy to understand and maintain. (Yes, ...
4
votes
1answer
78 views

Wrapper for Java logging

I am currently working on a new version of my application, and I just finished rebuilding the log part. It works well but I am skeptical about the choices I made. I am a student and I work alone in ...
2
votes
2answers
76 views

Logging errors and debug messages

I'm currently working on a small project that uses Java to handle a socket-based MMO browser game. I'm still at the beginning of the project and I'm currently writing a class that logs errors and ...
0
votes
1answer
53 views

SQL message logger run loop

I am learning Java by reading source code of other authors. This Java method handles communication with SQL database. While the code does work several things concern me. For instance the ...
0
votes
3answers
87 views

Overwriting native console.log function in JavaScript

I want to override the console.log function in order to save the data other scripts log. My script executes before any other script, so I have full control over the ...
1
vote
0answers
28 views

Grouping logs and providing counts

The code is supposed to group start and end time logs and provide log counts and unique ID counts. The grouping will be variable 1 hour, 6 hours, 12 hours, 24 hours, etc. What is the better way to ...
10
votes
1answer
649 views

Scraping after login using Scrapy

I just finished a scraper in python using scrapy. The scraper logs in to a certain page and then scrapes a list of other pages using the authenticated session. It retrieves the title of these pages ...
5
votes
2answers
62 views

Splitting a CAN bus log in .asc format

I've written a quick script for a coworker to split a large CAN log into smaller chunks. (If you're not familiar with CAN, it's a communication protocol used by the ECUs in many cars.) I know where ...
3
votes
0answers
29 views

How to properly set a different formatter for a specific logger's child?

For certain modules or functions, I want to have a different format for the logged messages. I have done this in a way that looks a bit hacky: I have set a special Logger, containing a special Handler,...
3
votes
0answers
284 views

AngularJS client side logging in a MVC web application

Being a newbie into AngularJS, I have overlooked the importance of client side logging until some non-reproducible client-side errors occurred and I realized that they were not logged. My web ...
1
vote
0answers
39 views

F# logging agent with mailboxprocessor

I'm still learning F# and have written this logger agent I want to use in a project. How is the coding style? Especially the part with MailboxProcessor.Start ... ...
2
votes
1answer
824 views

Injectable logging with NLog and Ninject

I have been using NLog for logging purposes in my web applications, but it was not injectable. More precisely, each class using logging declared the logger like this: ...
0
votes
1answer
162 views

Python + spark to parse and save logs

I need to parse logs and have got following code. I can see two problems: map().filter() may induce some performance penalties and copy-paste block parser.py: <...
3
votes
1answer
45 views

Simple console directive, revised using provider

I recently created my first directive based on jQuery plugin and I asked for review here: Angular console like window - first directive I've edited my directive so now instead of ...
4
votes
1answer
58 views

Memory efficient Log Parser

I wrote this together for a test I'm doing that parses the Heroku access log. What I'm mainly interested is if this code follow common best practices and if there are any improvements I can make in ...
0
votes
0answers
36 views

Whois lookup tool

I've created a tool that searches for keywords given as ARGV then scrapes the first page of Google for the keywords, from there it logs all the urls found on Google,...
3
votes
3answers
90 views

Preventing floods while saving logs

I had a logging function… ...
6
votes
1answer
392 views

Logging object for C++

I've been always updating my log methods, because I started SDL and I needed some new methods. First, I made difference between debug and release, and so console and file. But now I want a more ...
4
votes
1answer
662 views

Lightweight logging library in C

I want to get some practice in writing C libraries and so started with something I can use straight away, a logging library. It is very basic and only has two levels: log everything and log only ...
5
votes
2answers
109 views

Method/parameter tracer

I am writing a class which can log the activity of an application during run time. The plan is that the SupportMI string will be sent to a DB, from where I can use ...
3
votes
1answer
60 views

Logging the load balance

I created a load balancing server at work and have to keep track of which server it adds the user to, so I wrote a little Ruby script that will do just that. I'm looking for any critique of my work, ...
2
votes
2answers
97 views

console.log helper function

I've seen the code for this function in John Resig's book 'Secrets of JavaScript Ninja' yesterday. I considered it useful at once because I've disliked repeatedly typing ...
5
votes
1answer
74 views

Function outcome: consistent approach and easy logging

My goal is to make a consistent and easy way to determine how a function fails/succeeds. I'm looking for code review of my Status class for any bad practices, code ...
3
votes
2answers
45 views

Return the first number found greater than the provided input number (13 digits)

This script converts the numbers to be at least 13 characters long (for UNIX_MS strings). For use with timestamps, I'm having issues with it being very slow. I wanted an alternative to grepping for ...
0
votes
0answers
253 views

Threadsafe Logger with scopetime logging

I wrote a Logger which uses the destruction of temporary objects to Log their values including a scope time logger. Lets see what i can improve here to increase the performance and everything else. <...
2
votes
0answers
56 views

The perfect multi-output logger

I needed to write my own lightweight GO multi-output logger for a work project and I've come up with https://github.com/asticode/go-logger. Basically the projects works like this: ...
2
votes
1answer
1k views

Daily Log file - Multithread with date and time

I have one window service. At any given time this window service runs 5-10 threads and each thread do some logging on text file. Logging can be exception or some information related to task/job. I ...
2
votes
4answers
471 views

Implementing a thread safe log class with simple functionality

I have finally assembled an attempt to create a thread safe logging class and also ensured by file flags that file should not be accessed by different processes at same time. This classed will be ...