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.

43 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
133 views

Advanced Logging Function

Way more blood, sweat, and tears have went into this then I would care to admit, but this has been a function I have been using in some shape or form for quite a while and it has taught me alot. It ...
5
votes
0answers
171 views

CIS 194 Homework 2: Parsing an error log

Here is another reference solution, that I discovered after writing my own: https://insight.io/github.com/beloglazov/haskell-course/blob/HEAD/hw2.hs I am following this lecture course as a ...
5
votes
1answer
95 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 ...
4
votes
0answers
57 views

Type & Thread-safe Logger Implementation

So I had previously posted this question and asked for some feedback regarding my (now) header-only logging system and figured it would be a good time to go back to the changes I made it and see if it ...
4
votes
1answer
123 views

State logger for optimization problems

I am working on a C++ project for solving a class of optimization problems. The project will be header-only, and for now, I would like to stay with C++11 (so, not fold-expressions). To be able to ...
4
votes
0answers
3k views

Logging in ASP.Net MVC project

I want to implement a Logger and use Serilog as Provider. My Project is ASP.NET MVC Framework (not core). Initially I tried to replicate ASP.Net Core Logging framework. I created a ...
4
votes
0answers
8k views

Logging into Database with ASP.NET Core

In the Startup.cs of my ASP.NET Core application I want to configure the LoggingFactory so that it logs into the database. ...
4
votes
0answers
792 views

Passing a custom parameter through a logger

I have a custom logger which logs all messages at WARNING level and above to a Slack channel. Certain error messages occur so frequently that they make it hard to ...
4
votes
0answers
792 views

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 while it's running. With the logging module I get timestamps ...
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 ...
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 ...
3
votes
0answers
32 views

Eassily create a logger in python for many modules with loglevel set according to command line arguments

I'm trying to learn writing python programs in a modular way as much as possible. One of the issues I've had difficulty to solve is parsing command line arguments (with ...
3
votes
0answers
83 views

Restart a service and check its status

I have written this script to stop and start a specific service and check if it was able to load and unload applications tasks correctly, by checking a status in application log. Also it writes a log ...
3
votes
0answers
526 views

Parsing simple log files in Julia vs Python

I wrote a log parser in Python and Julia. The Python version takes about 8 seconds to process 350 files, while the Julia version takes about 8 seconds to compile, after which it takes over 20 seconds ...
3
votes
0answers
187 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. ...
3
votes
0answers
58 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
657 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 ...
2
votes
0answers
23 views

Powershell - Simplified Logging

Today I have dealt with logging in PowerShell as well as with the different streams and the pipeline. Unfortunately, none of these solutions really met my needs. My requirements are: I need to ...
2
votes
0answers
54 views

Python logging setup for a package

I'm running a package that downloads data from the internet. This package makes logging calls from different modules. Suppose I have a package 'demopackage'. Here is how my logging is currently set ...
2
votes
0answers
284 views

Typescript logger class

Looking for a critique of this simple logger class I'm working on in my transition to TypeScript. The purpose of the logging class is to just print to a console either info, warn or error messages. ...
2
votes
0answers
30 views

Websocket 'onmessage' logger to MongoDB

I'm learning websockets and wanted to make a websocket onmessage logger which writes the received data in a mongodb. I'm starting my script with ...
2
votes
0answers
435 views

Logging to file with size limit

This works, but there must be a better, more memory-efficient way to do it. log.Init checks to make sure log file exists, and creates it if it doesn't. It also ...
2
votes
0answers
101 views

Function to log arguments and return value of any function in Clojure

I have implemented a function, which logs the inputs and outputs of any function, indenting the log based on the depth of the call stack: ...
2
votes
0answers
107 views

Creating instances of a logger class for various logging levels

I provide a class to use but for convenience I want the class to implement some instance methods as static methods. This was fast and concise but it feels smelly, probably because I'm modifying the ...
2
votes
0answers
40 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 ...
2
votes
0answers
921 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
71 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
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 ...
1
vote
1answer
38 views

An asynchronous logger

I've written a simple asynchronous logger (playground): ...
1
vote
0answers
23 views

Refactor log4j2 properties file

I have the following log4j2.properties file: ...
1
vote
0answers
170 views

Include Serilog sink requiring dependency before dependency injection in .NET Core

Here is a rundown of the situation This is a .Net Core (2.1) application with a console and web front ends. For simplicity this question focuses only on the console end although the web end has the ...
1
vote
0answers
155 views

Stored procedure that adds row-level auditing to a table

I'm looking for any suggestions on how to improve my T-SQL for this procedure. It works okay, but I'd like to get advice to improve it from more experienced SQL developers. This procedure adds 4 ...
1
vote
0answers
56 views

Testable filesystem Writer for logging, with log rotation

I want to implement a custom Writer that allows the native go logger to do log rotation, and I also wanted to be able to write tests for it. The general idea was ...
1
vote
0answers
23 views

Logs UI errors to a service provided in the configuration

As part of the project I am currently working on we want to log our UI component errors as well. I developed this package as a base. It's a factory (basically, not sure if it's correctly a factory). ...
1
vote
0answers
53 views

Basic Java Android app for computer data logging in an SQLite database

This is a pretty basic app I made to collect data necessary for a separate project. However it's also my first go at doing any Android programming, so I know there's definitely issues with it (the ...
1
vote
0answers
41 views

Logging netflow connections based on IP address ranges and blacklists

Background and assumptions: A flow corresponds to a netflow record that is written into mongodb. Each flow record has a ...
1
vote
1answer
964 views

Async time logging in multithread application

I have a simple producer-consumer multhithread application, I am trying to measure a few points in both threads for benchmarking. What I came up with is the TPL dataflow library of .Net, and I have ...
1
vote
0answers
375 views

Simple AuditLog

I am using ADO.NET in my project and I want to have a simple AuditLog. I have below Codes for that but I wounder to know is ...
1
vote
0answers
140 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,...
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 ...
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 ...
0
votes
0answers
16 views

QTP/UFT Prints the time in takes to complete every task in a Log using VBScript

This script is meant to log the time it takes to complete functions in order to find the locations where performance could be improved in QTP. If a duplicate log is attempted, the script changes the ...
0
votes
1answer
80 views

Fluent interface for Logger

I was trying to wrap a Logback logger in order to provide some handy methods and already defined default keys of the logged json output and I came up with something like this. Do you spot any ...