Questions tagged [logging]

Computer data logging is the process of recording events in a computer program or computer system, 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. Be sure to include appropriate software or hardware tags in addition to this tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Define Schema for Bigquery Log Sink in GCP

I am using the Bigquery Log Sink for GCP. As stated by the documentation, BigQuery Log Sink defines the schema of the table based on the first record inserted. Any changes in record structure in ...
Harbeer Kadian's user avatar
0 votes
2 answers
28 views

Not able to mock Logger

I'm trying to mock the logger provided by @Slf4j for one of my unit tests. But I am unable to do it. Below are the code samples I am using. Code for my service package com.someorg; import jakarta....
Shivang Mangal's user avatar
1 vote
1 answer
27 views

How to print a log incase retry until condition is true in karate

Is there a way to print the actual and expected value before the retry happens in karate
Nagulan S's user avatar
  • 733
1 vote
0 answers
19 views

Disable log color for file appender, enable for console

I am working on my first Rust app, and I want to log to both stdout as well as a file. I want the console logs to include ANSI colors, but don't want those escape codes in the text output. Is this ...
chimericdream's user avatar
0 votes
0 answers
5 views

In samba can vfs FULL_AUDIT be configured not to use syslog

It seems that FULL_AUDIT automatically uses the syslog facility, but I would rather it just wrote to a file in /var/log/samba/ I know how to configure syslog to do that, but I'd prefer to use the &...
Chris Harvey's user avatar
-1 votes
0 answers
36 views

Golang parallel test - logging inside inner functions

I'm running go test with t.Parallel set in all my tests. During the test I call multiple inner methods from other packages I developed. All of these methods are using log.Printf for logging. When I ...
Tomer Bar's user avatar
0 votes
0 answers
8 views

Log4j2: programatically adding additional logger with different log level

I am using log4j2 to programmatically create some loggers. I should have a root logger with a console appender and a file appender. Additionally, there should be an SMTP appender that only logs on ...
frankmurphy's user avatar
0 votes
0 answers
28 views

Replace all the error level logs to the warning level in JS? [duplicate]

A part of the scripts e.g. xhr.send(this.data) fires e.g. 404 (Not Found) error log on the console, but I need to avoid to have any error logs on the console because it affects the SEO of the page, so ...
丶 Limeー来夢 丶's user avatar
0 votes
1 answer
34 views

How add timestamp to rust stderr

I use tokio for async code and env_logger to stdout. So in stdout clear when the event took place: [2023-11-29T02:30:03Z INFO myapp] connected success But in stderr only: Error: Io(Os { code: 111, ...
ggoha's user avatar
  • 2,036
0 votes
0 answers
10 views

Save frontend logs to file with angular packaged in electron

I need to save every click of button and every event on frontend to a single log file. File should be created every time we start desktop application. I've researched about many libraries that could ...
kindCudi's user avatar
0 votes
0 answers
16 views

Tensorflow exceptions in dataset from generator logged before except block

I am trying to encapsulate my Tensorflow dataset generator in a try-except block. However, the whole traceback is logged before the code enters the catch block. In this minimal case: try: def ...
Arian Maghsoudnia's user avatar
0 votes
1 answer
28 views

Configuring NLog for writing to a network file path in an ASP.NET Core MVC Application

We are attempting to load balance an ASP.NET Core MVC application that uses NLog to log using File Target. The load-balanced setup will have multiple application servers, and the plan is to store the ...
Sabarish Sathasivan's user avatar
1 vote
1 answer
83 views

Preventing sending some trace logs to Azure with Open-telemetry

I'm sending logs to Azure AppInsights by using Open-telemetry. The library keeps sending trace data constantly not only when the log occurs as shown in the picture. Is there an any way to close this ...
SerkanB's user avatar
  • 47
0 votes
1 answer
35 views

How to control Rest Assured's logging filters through log4j2.xml?

I want to redirect RestAssured 5.3.0 logging to log4j2 and be able to control the logging from log4j2.xml config. My App example: package org.example; import io.restassured.RestAssured; import io....
Georgi Georgiev's user avatar
0 votes
1 answer
51 views

Azure Functions HTTPTrigger Node.js: bind/call context.log() in my class

I want to use Azure Functions' context logging methods in my own class depending on the first word: if str starts with error then use context.error(str), otherwise use context.log(str). I think I have ...
droptix's user avatar
  • 63
1 vote
1 answer
30 views

Custom detailed log in Karate

I want all my karate logs to have the featureName, scenarioName , LineNumeber along the logged message. Any idea if this is possible?
Nagulan S's user avatar
  • 733
0 votes
0 answers
5 views

PM2 Keyboardinterrupt

When I do pm2 logs followed by the process name, such as pm2 logs testing, the logs display as expected. However, the only way I can exit the logs is by using ctrl + c. This action triggers a ...
Amarna's user avatar
  • 1
0 votes
0 answers
20 views

Redirect output and error to the same file using ProcessExecutor

I am using ProcessExecutor org.zeroturnaround.exec.ProcessExecutor, for executing a shell script in Java. The requirement is to to color code any error logs from the execution and write the output ...
a_good_human's user avatar
0 votes
1 answer
40 views

Carbon's addMonths is being called 2 times in Livewire

Im building a project in Livewire. Now i need to show an attendance page. So far it is working fine, but it works only for the current months(as it should). My idea is to show the previous and ...
Raxmatullo Erkinov's user avatar
0 votes
1 answer
38 views

Logger not printing INFO level logs - Python 3.10

I'm using this code in all my Python scripts for logging: import logging # Define the setup_logger function (similar to the one you provided) def setup_logger(dtc_name, log_dir, is_debug=False, ...
Vexx1988's user avatar
-3 votes
0 answers
23 views

How do i fix log in system on my website only working in localhost? [closed]

When i log into my phpmyadmin database and php scripts it works just fine. But only when i am on a local version of my website. When my website is online the log in system turns blank and does not do ...
Kristost's user avatar
1 vote
0 answers
11 views

How to capture the print of the subprocess while polling with subprocess.Popen

I'm creating a small gui under ubuntu which starts a subprocess and prints the log in a text box. In my function, it calls another program using subprocess.POpen and print the log of the subprocess in ...
Ames ISU's user avatar
  • 199
0 votes
0 answers
11 views

Is it possible to only log the query and parameters, omit the result from the query in hibernate log4j

[DEBUG] 2023-11-24 18:58:06.198 [http-nio-8080-exec-9] SQL - select distinct employee0_.ID as col_0_0_ from EMPLOYEE where employee0_.ID=? [TRACE] 2023-11-24 18:58:06.198 [http-nio-8080-exec-9] ...
Dark Knight's user avatar
0 votes
0 answers
19 views

Change NestJs logger type to console on specific controller/API instead of global

I'm trying to change the logger type of NestJs to use the built-in global JavaScript console object. Referring to this documentation: https://docs.nestjs.com/techniques/logger This can be done in main....
Nigel's user avatar
  • 987
1 vote
2 answers
82 views

Logging API request and response using DispatcherServlet in SpringBoot - dispatcher executed twice

I've created a custom DispatcherServlet implementation in Spring Boot 3.2.0, that's aimed for logging incoming API calls. The goal is to log all incoming (request) and outcoming (response) data, ...
t4dohx's user avatar
  • 656
0 votes
0 answers
10 views

How to display value of a datadog log facet, as a query value widget on a datadog dashboard?

I am currently sending json data from AWS Lambda to Datadog, via AWS Kinesis Firehose. The data has key value pairs, for example { "active_count": 10000, "deleted_count": 100, ...}....
user21829016's user avatar
0 votes
0 answers
23 views

How can I prevent writing health check requests to nginx access logs in an Elastic Beanstalk environment?

I'm currently working with an Elastic Beanstalk environment where Nginx is used as the web server. By default, all incoming requests, including health check requests, are being logged in the access ...
Abdulkadir Mete's user avatar
-1 votes
0 answers
31 views

Nginx Access logs doesn't log anything

I am using nginx docker as a reverse proxy and a loadbalancer from Big F5 So I have a virtual server using a custom ip attached to the DNS url_custom.test.com. When I am using http://url_custom.test....
Raphyyy's user avatar
  • 27
0 votes
0 answers
14 views

How to monitor a Windows shares for changes?

I want to create a program which monitors and logs creation, modification, deletion of files in a directory, most importantly it should be able log the username/SID of the user who made those changes ...
Nanak Singh's user avatar
0 votes
0 answers
21 views

docker logging driver awslogs isn't sending logs continuously [closed]

Hi I have 5 docker containers running in one ec2. All my docker containers' logs are stdout. I can see the logs when I do docker logs -f containerid. So I wanted to send the logs to cloudwatch using ...
MD. Zeaul Hoque Shuvo's user avatar
-1 votes
0 answers
35 views

log4j2: Save logs to different file based on log content

I am using log4j to for logging, I have example logs here 2023-11-24 14:01:11,656 [main] INFO org.sparkproject.jetty.server.handler.ContextHandler - Started o.s.j.s.ServletContextHandler@77bb48d5{/...
cpawali's user avatar
  • 276
0 votes
1 answer
53 views

C# Export Logs to 2 txt files

So I have a button made from my xaml file (view), called Export. When the user clicks on it, the logs created during the run of the app get exported to Logs.txt. If there are Warnings, Errors or ...
PinkGoat_'s user avatar
-1 votes
2 answers
32 views

how to logrorate log hourly in linux

I have set the logrorate conf as follow /var/adm/ras/cherrypy/cherrypy_access.log { compress rotate 7 maxsize 10M hourly copytruncate missingok notifempty } /var/adm/ras/cherrypy/...
hundun's user avatar
  • 1
0 votes
0 answers
24 views

How to organize logging of a class in a module?

I have a class Cache and I want to implement logging in it. And I also want to be able to run a module with this class and logging from the command line with arguments (when argument -s is passed - in ...
zaelcovsky's user avatar
0 votes
1 answer
37 views

Serilog duplicated logs

I have an ASP.NET Core 6 application with a Blazor frontend and I'm using Serilog logger. Currently I have the following configuration for the loggers. As you can see I have three loggers, the first ...
Mauro Alvarez's user avatar
0 votes
0 answers
16 views

How to limit size of or logrotate php-fph access.log file?

I've inherited a php-fpm based EC2 webserver. The wordpress.access.log file in EC2 is almost 2GB and is eating up the drive. I'd like to limit it's size somehow. My php_fpm_site.conf has access.log = /...
Miles's user avatar
  • 35
0 votes
1 answer
16 views

How to see print statements using pytest-watch?

While debuging my python code, I'm trying to see the print statements while running the tests. If I run pytest -s or pytest --capture=no I can see my prints as expected but when I try to pass the ...
Gustavo Melo's user avatar
0 votes
0 answers
24 views

How to Forward Azure Firewall Logs to a Syslog Server [closed]

I want to ask a question regarding Azure Firewall. I have an active Azure Firewall Subscription and I want to Analyse Azure Firewall Logs in real time so I want Azure Firewall to forward logs to a ...
amykashyap's user avatar
-1 votes
0 answers
14 views

Using Log4j Bridge jar log4j-1.2-api, DEBUG logs get printed even if Level set to INFO

For a core java ETL application, we are trying to upgrade from log4j 1.2.17 to log4j 2.17.1 and thought of using the bridge jar log4j-1.2-api version 2.17.1 but strangely it started printing some ...
abhihello123's user avatar
  • 1,676
1 vote
0 answers
34 views

Serial communication logging with data transfer

I am trying to develop a communication script for a device that is connected through serial port in python. I am sending and receiving data from/to the device using functions. Now what I would like to ...
Gábor Erdős's user avatar
0 votes
0 answers
31 views

loguru in flask app hosted at pythonanywhere crashes the uWSGI workers

I have a very simple Flask app running on pyhtonanywhere at hacker level account. When I send a load to below code due to enqueue option in file logger below crash happens. The log file does not ...
giraycoskun's user avatar
0 votes
0 answers
23 views

Serializing and stringifying an error object nodejs

I'm having this unknown error pop up occasionally during production when this API is called. Given this simplified api(using Nest.js): @api async blabla(@Req() request: Request) { try { //a ...
Nigel's user avatar
  • 987
0 votes
1 answer
63 views

How to record logs with NLog .NET Core 6

I am using NLog for logging my app, I only followed an example from the documentation but I can't understand some things, such as, what is the "logger" property for within the rules section? ...
Alonso Contreras's user avatar
0 votes
0 answers
37 views

Logging hangs on fwrite()

I am using C++ for a big project, for which I am using spdlog to do the logging for me. When my program is running single threaded, everything works fine, I am even using multi sinks (stdout for info ...
mewais's user avatar
  • 1,327
0 votes
0 answers
44 views
+50

GCP python script on VM cloud logging - No logs appearing

I am new to GCP / cloud services in general. If I have a simple python script below, how can I get it to show up in the google cloud logging explorer without modifying the python code? Is there ...
Matt Elgazar's user avatar
0 votes
2 answers
59 views

How to pass a struct and use its field automatically in slog logger?

I'm using slog package. I'm facing the problem that I have to pass too much parameters to it while I have most of these parameters in a struct. Is there a way to modify the handler to make use of this ...
dana darvishzadeh's user avatar
-1 votes
1 answer
54 views

Executing workflow commands for GitHub Actions using a Python script

I am trying to log a warning message in my GitHub Actions workflow using a Python script. The script writes the following output in the workflow: ::warning file="./german.ini",title="...
Aditya's user avatar
  • 1,142
0 votes
1 answer
42 views

Using child process to implement a logger function in c?

I have an issue here with the following code. So in the logger.c file I am creating a logger child process which will keep looping waiting for reads. whenever running, I don't get anything it just ...
dsdfs's user avatar
  • 21
0 votes
0 answers
15 views

Writing to stdout and stderr will mix together

I am implementing a console logger, and I am using setvbuf() to let the stdout and stderr work in _IONBF mode, so that every time I use fwrite(), the content should be immediately flushed to the ...
benrush's user avatar
  • 45
0 votes
1 answer
38 views

How to save all logs printed by System.out.println to ta file in Tomcat 9

I have some windows product, which comes as .exe file. When I run it, it has tomcat 9 server with some webapp inside and it runs the tomcat via startup.bat in the background. Running startup.bat in ...
Zlelik's user avatar
  • 560

1
2 3 4 5
825