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.

0
votes
1answer
11 views

Log Parser Studio Query - IP address by most recently accessed?

I'm trying to look at the IIS logs with Log Parser Studio to determine how recently some IP addresses have accessed a website. I've used the following query below to at least get myself a count over ...
0
votes
1answer
22 views

why does logstash stops processing logs

Logstash stops processing logs after some hours. When logs stops processing logstash service consumes high amount of CPU performance (about 25 cores of 32 total). When logstash service works normal it ...
1
vote
1answer
31 views

Python: Is it a good idea to pass the logger around?

My API of a web server logs like this: started started succeeded failed That's two requests received at the same time. It's hard to tell which one succeeded or failed. To separate requests from each ...
7
votes
1answer
75 views

How to do clean logging, without making code look awful?

I am trying to write clean code, so i don't want my code to be polluted with random logging. This for me looks awful: def generate_auth_token(self): logger.debug("Existing auth token: {}".format(...
0
votes
0answers
9 views

Xcode does't print any debug logs after Attach to Process by PID or Name

I use Xcode Version 10.2 Normal app debug print logs as expected, but when I want to test some delegate like - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (...
0
votes
0answers
16 views

Logging multithreading application. [Errno 24] Too many open files

5 threads share the same logger class instance and logfile, raise [Errno 24] Too many open files Tried to override logging methods to close file handler each time after record was made. class ...
0
votes
0answers
11 views

SSR Client side logging error logging with stack trace

Problem: In React-Redux application with Server-Side-Rendering on client side I want to log errors with stack trace. I want to send these errors to server side and then to the log collector service. ...
0
votes
0answers
11 views

How and when to use `console.dirxml()`

I was recently asked this very strange JS question and had no idea how to answer it: How do you use the console.dirxml() function? You can check the documentation, but you have a give a real-case ...
1
vote
1answer
38 views

Filter Apache Spark Log4J Messages to keep only those which contain specific string

I have some code written in Java which uses Apache Spark and I want to disable all Log4j log messages levels (ERROR, WARN, etc) and keep only INFO level ones that contain a specific string. In other ...
0
votes
0answers
8 views

Log4j2 don't write in parent loggers

In my project, I have some packages like: a.b.c I have defined several loggers for each kind of package, like: <Logger name="a.b.c" additivity="true" level="warn"> <AppenderRef ref="...
0
votes
0answers
7 views

For pinojs logger is it possible hook into a destination stream for sending notifications

This question relates to the pinojs logger. https://github.com/pinojs/pino/issues/644 In production writing to a pino destination (a file in my case) is there a way to hook a function in that stream ...
0
votes
0answers
31 views

Inheritance & singleton not working as desired

Having that project config: - src/ |-- classes/ |-- Logger.py |-- Browser.py |-- ubigeo.py - main.py I'm trying to use python-logstash-logger setting up in Logger.py class to print ...
0
votes
0answers
8 views

Stackdriver advanced filter query without wildcards

I have logs being sent in JSON format to Stackdriver, each which contains an entry like: name: pipeline.<application>.process where <application> is a variable length string that ...
3
votes
1answer
29 views

Duplicate messages from a class logger

My class constructs a logger named after the class in init(). Now when I log a message, I get one copy of the message for every instance of the class that has been created so far. How do I avoid ...
1
vote
1answer
43 views

Failed docker build has no logs - “configured logging driver does not support reading”

I'm trying to debug a docker build on a Digital Ocean droplet but I can't seem to access any logs. When I run the build command it returns an exit code 137. This is my build command: docker build --...
1
vote
1answer
58 views

Overhead for Golang's logger if set to discard

I have a HTTP handler that has 40 loggers that is set to os.Stdout. It works just fine for me as I am the only one testing at the moment. But, when it goes to the production, I'm afraid it will have ...
1
vote
0answers
23 views

Providing “resource” argument to CloudLoggingHandler class does't work

Providing resource argument to CloudLoggingHandler class doesn't work, that is, it cannot logging to stackdriver. If I comment resource out, it works fine. I also tried a simple python script that ...
1
vote
1answer
29 views

How to check logs generated through logrus, to get a count of the no. of errors and warnings

I wanted to a way through which we could keep the count of no. of errors and warnings that have occurred in logrus logs. I want to use a struct to keep count of the errors and warnings, type ...
0
votes
2answers
35 views

How to avoid printing log main class name always while printing logs?

I want to print the log in console. I am using java.util.logging.Logger class to print the log. Below is my code. import java.text.MessageFormat; import java.util.logging.Logger; import com.practice....
0
votes
1answer
20 views

Getting proper logs from Elastic Beanstalk (Spring Boot)

I'm running a Spring Boot application in Elastic Beanstalk. I find exploring the logs in Elastic Beanstalk somewhat unintuitive. I'm only presented with 2 options, download all logs, or the last 100 ...
1
vote
1answer
14 views

Python RotatingFileHandler not writing all results where FileHandler does

I have noticed that when I use the RotatingFileHandler not all of the events sent to the logger are written. If I change to FileHandler, everything gets written. If I set my handler like this: ...
0
votes
0answers
23 views

Splunk regex line breaker, combining multiple ERROR [stderr] lines into one event

I am working on displaying logs from docker json-file in splunk. For the most part I have it working, except for when a stack trace is printed. I know e.printStackTrace() isn't best practice, but our ...
0
votes
1answer
15 views

How to enable logging on influxdb to a file in docker

I have influxdb running using docker and currently logs can be seen only by docker logs command but I want the logs in /var/log/file.log how can I achieve it. I tried adding RUN ln -sf /dev/stdout ...
1
vote
1answer
42 views

python 3.6+ logger to log pandas dataframe - how to indent the entire dataframe?

I need to use python logging module to log pandas dataframe. I need the entire dataframe (all rows) indented equally. Below is the simple desired output: Test Dataframe Output Below: col1 ...
0
votes
0answers
42 views

How to get StatusCode from request in PowerShell

I need to get success and/or error status code from a request using power shell. And i'm always getting a blank status. I have tried with Invoke-WebRequest and Invoke-RestMethod. I have sucess on the ...
0
votes
0answers
23 views

Log configurations in my Java application

I'm using a library called JSONPath to parse JSON messages in Java. I should always add the following code to make its redundent logs to disappear. Is there any ways to do this in the log4j .xml ...
0
votes
0answers
15 views

Hazelcast does not close the diagnostics log file on termination the instance

We use Hazelcast 3.12 in our application that is run on Tomcat. The Hazelcast instance is started with the diagnostics log feature enabled: config.setProperty(Diagnostics.ENABLED.getName(), "true"); ...
0
votes
0answers
10 views

Flask log level display in Apache logs

In my Flask app hosted in mod_wsgi I have app.logger.info('Starting...') which is rendered in Apache logs as [Thu Apr 18 14:48:59.845824 2019] [wsgi:error] [pid 15:tid 139770524575488] [remote 172....
-2
votes
1answer
15 views

Python: log myobj.myprop even if myobj or myobj.myprop are None?

I'm looking for a shortcut for: name = '' if myobj not None and myobj.name not None: name = myobj.name date = '' if myobj not None and myobj.date not None: date = myobj.date logging.info('...
0
votes
0answers
13 views

Connecting to gremlin server from python API duplicates log messages

After connecting to a Gremlin Server, all of my log messages are duplicated. I am using the following code to connect. graph = anonymous_traversal.traversal().withRemote(DriverRemoteConnection("ws://...
0
votes
0answers
11 views

Python/init.d: how to log ERROR to file and read DEBUG in live without storing?

I've a Python script that is started on boot as a service: /etc/init.d/my.service. The service calls the script /path/to/venv/python /path/to/script.py. Within the script.py I've a logger that ...
-3
votes
0answers
17 views

logging/monitoring on AWS: why should i forward cloudwatch logs to elasticsearch? [on hold]

I don't understand why i should stream my cloudwatch logs to elasticsearch. what is the advantage? I've logs from multiple microservices which are streamed to cloudwatch. It is used to monitor the ...
0
votes
0answers
20 views

when i deploy my project on testing server, logs are not generated in log file. i am getting blank log file

I am using maven in spring boot project. this is pom.xml <groupId>nic.vahan.services</groupId> <artifactId>vahanLoggerApp1</artifactId> <version>0.0.1-SNAPSHOT</...
-2
votes
1answer
53 views

Need help creating a txt log file in Python

I am stuck on an assignment: We have to make a password checker with a txt log file logging the time and date a password was put it, but only if the password doesn't meet the requirements to be ...
1
vote
1answer
20 views

How do slf4j Logger's debug/error/info methods internally work?

I tried to find the implementation of these methods but no luck. I want to know the implementation so that I can know how it handles String internally. I couldn't find anything anywhere. Possible that ...
0
votes
0answers
13 views

how to show real time logging info with fasttext in python

Is there a way to print to the terminal the progress logging info as a model is being created with fasttext? classifier = ft.supervised(model_data, model_name, label_prefix=label_prefix, lr=lr, ...
0
votes
0answers
20 views

Log forging issue in fortify scan

I have logged request object in my method as mentioned below.but it's showing log forging while doing scan in fortify. Ex: public Responses Tory<EmployeeResponse> saveAllEmployess(List<...
2
votes
2answers
40 views

python logging module outputs extra information to the console

I would like to use logging to log information (currently same information) to both console and to a file. However, I am seeing extra unwanted information being printed to the console. I would like ...
0
votes
1answer
20 views

Writing to a file using a PeriodicRotatingFileHandler

I'd like to write to files using a handler I have defined in my standalone.xml (JBoss7) <custom-handler name="HierarchicalPeriodicRotatingFileHandler" class="com.logging....
0
votes
0answers
32 views

Symfony 4 Problem with “Using a Logger inside a Service”

Error: "The \"logger\" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection ...
0
votes
0answers
9 views

LOG4J 2 web application configuration with xi:include

i'm trying to set log4j 2 in web application. I add in my web.xml these lines <context-param> <param-name>isLog4jAutoInitializationDisabled</param-name> <param-value>...
0
votes
1answer
25 views

How to log all EF queries using NLog

I need to log all query in my project and first use this: public static readonly LoggerFactory MyLoggerFactory = new LoggerFactory(new[] { new ConsoleLoggerProvider((category, level) ...
0
votes
1answer
15 views

Date parsing issue in ELK Logstash with the custom Java timestamp format of logs

Following is the sample logs recieved from java application 2019-04-11 9:08:22:562 Log 1 2019-04-11 9:08:22:660 Log 2 2019-04-11 9:08:43:79 Log 3 2019-04-11 9:08:43:156 Log 4 From above logs, I'...
-2
votes
0answers
21 views

Track whats wrong sometimes on PHP contact form with file upload?

I have a contact form with file upload. Perhaps one of 100 submit, no file is uploaded and the user receives no error message and a mail is sent. About the same frequency it happens that the mail has ...
0
votes
0answers
15 views

append logs using 'filemode = a' does not work properly with python logger's fileHandler

I want to append logs in two different logfiles using python logger fileHandler. So, I created 2 different logger handlers(messaging_logger & payments_logger) handling logging in 2 files namely ...
0
votes
0answers
20 views

Remove varargs object arrays with ProGuard

I'm trying to remove the logs from my app using ProGuard. I follow up this documentation page, but unfortunately I was unable to remove the Object[] created by the use of varargs. Java Code My ...
0
votes
1answer
13 views

Is there any way to append the same log file instead of creating new files in python 3.x?

I'm writing a log file in my python script as below: logfile ='Datalog'+currtime+'.log' logging.basicConfig(filename=logfile,level=logging.DEBUG,format='%(asctime)s %(message)s', datefmt='%d/%m/%Y %...
0
votes
1answer
14 views

ExpressWinston does not log on 200 HTTP response code

I am using ExpressWinston for logging in Node.js app. Can we log requests for each static resources which are being called ? Logger does not log if file is found (200), but it logs when file not ...
0
votes
1answer
18 views

Windows IoT Core Logs on Raspberry Pi 3

I'v installed Windows IoT Core on my Raspberry Pi 3 (Model B) and successfully published some test .Net Core applications to it. Now i'm preparing a Background Application (i.e: Headless Application) ...
0
votes
2answers
39 views

python asyncio exceptions raised from loop.create_task()

I want my code to use python logging to log exceptions. In my usual code using await, exceptions are raised normally, so: try: await code_that_can_raise() except Exception as e: logger....

http://mssss.yulina-kosm.ru