Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
67 views

I wrote another question on this earlier, but could not pinpoint the issue on my side, here, I am giving a minimal reproducible code. System Angle version 0.5.6 UV 0.8.22 Python 3.12 Ubuntu 24.04 I ...
Della's user avatar
  • 1,730
0 votes
1 answer
87 views

I try to get logging setup hours:minutes:seconds,milliseconds Example: 11:28:51,284 Actually I get 2025-10-08 11:44:07,658 This is the source with which I try to do it: # --- Logging Setup --- # --- ...
SL5net's user avatar
  • 2,630
2 votes
1 answer
75 views

I wanted to print INFO and ERROR file separately in Python logging. When I use ERROR level, it's writing into both LEVEL defined files. log_config.json: { "version": 1, "...
Veera V's user avatar
  • 135
0 votes
0 answers
44 views

(Edit: skip to the end, this is all just context. I found the core of the issue later) I'm writing a Python UI program that I aim to compile to a .exe with pyinstaller, and for that reason I wish to ...
HydroPage's user avatar
  • 231
1 vote
2 answers
109 views

I would like to see the logging produced by some Python code from within a Jupyter notebook (logging version '0.5.1.2', python 3.12). If I run the following code: import logging logger = logging....
SeF's user avatar
  • 4,299
0 votes
1 answer
81 views

I have a snowflake event table created. The below code inserts log records into event table. import snowflake.snowpark as snowpark import logging def main(session: snowpark.Session): LOGGER = ...
T Prathyusha's user avatar
1 vote
0 answers
60 views

I've got some code that, for reasons not germane to the problem at hand: Must write very large log messages Must write them from multiple multiprocessing worker processes Must not interleave the logs ...
ShadowRanger's user avatar
0 votes
0 answers
78 views

I'm trying to assert the fact that my loggers writes to stdout, but I can't get it to work. I ran the logger in a python file to make sure it outputs something in the standard output. So far, I can ...
Marco Bresson's user avatar
3 votes
1 answer
95 views

In order to show logging messages in a PyQt GUI, I'm using a custom logging handler that sends the logRecord as a pyqtSignal. This handler inherits from both QObject and logging.Handler. This works as ...
mahkitah's user avatar
  • 1,024
0 votes
1 answer
99 views

My python flask/Quart app has the following log format: ## 2025-04-04 05:16:07 INFO Running app... How can I configure the <source> of fluentd config? I have tried: <source> ...
khteh's user avatar
  • 4,280
1 vote
1 answer
320 views

I have this decorator in python 3.11 that sends a signal encoding the arguments to a function call that it decorates, here: def register_action(signal=None): def decorator(func): def ...
KBriggs's user avatar
  • 1,498
0 votes
0 answers
30 views

I would like to change via command-line the logging level of my unit tests - I am talking of the logging level, which means the amount of info that can help me debugging a module that I am testing (...
Lorenzo's user avatar
  • 180
0 votes
0 answers
35 views

import logging import os from pathlib import Path from pydantic import BaseModel, Field, field_validator # Configure logging logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) ...
Cthulhu's Rage's user avatar
1 vote
2 answers
67 views

I know the subject sounds counter-intuitive but bear with me. My goal is to have two rotating file log handlers, mostly for logger.exception() calls, one that includes stack traces and one that doesn'...
DaveB's user avatar
  • 554
0 votes
0 answers
37 views

See this question about sending exc_info to a log file but not to the console using Python's logging module. I want the exact same behavior, except that I'm using coloredlogs. How can I do this? ...
kviLL's user avatar
  • 443
0 votes
1 answer
103 views

I'm trying to implement logging in a Python application where I use both threads and processes. I have a custom LoggingManager that uses a QueueHandler to push log records from multiple processes to a ...
Basavaraj Biradar's user avatar
0 votes
1 answer
290 views

I have this application and app.exception_handler correctly handles the exceptions that arise. There is one problem though, i.e., it does not stop the exception to be displayed in the stdout. Is there ...
Javi Torre's user avatar
1 vote
0 answers
44 views

I am trying to push logs for a multiprocessing job into ECS S3. Following is my code snippet: logger.py import logging from S3_log_handler import S3LogHandler def setup_logger(): # Set up the ...
Rupal's user avatar
  • 79
0 votes
1 answer
63 views

So the situation is the following: multiple internal packages written in python which do rarely log and if only use, these use the basic python logging module, since this is as far as I have read ...
Code_beginner's user avatar
1 vote
1 answer
70 views

I'd like to make a function that restarts once it hits a certain number, as an example: if call_count > 7: Return to 1 or 0, is this possible? and if it is can anyone help? Thanks if call_count &...
D3AD_SHOT's user avatar
0 votes
2 answers
89 views

Consider the following minimal setup: /mymodule ├── __init__.py ├── main.py └── worker.py __init__.py is empty main.py: import sys import logging import multiprocessing from test.worker import ...
Art Gertner's user avatar
1 vote
1 answer
83 views

is there away to make this code not spam in the second file without interfering with any other functions? "Anomaly.log" is being spammed although "Bandit.log" is not being spammed, ...
D3AD_SHOT's user avatar
0 votes
3 answers
61 views

I'm trying to log every time the function "Hello" finds 1.png. Is there a way to do this using counter or some other method, it would then log it into "anomaly.log" using logging, ...
D3AD_SHOT's user avatar
1 vote
0 answers
107 views

I am working on using the Python logging package. I am using Python 3.12.8 from uv. The documentation gives the following code snippet as an example: import logging logger = logging.getLogger(__name__)...
Eleanor Holley's user avatar
1 vote
1 answer
51 views

Here is a MCVE, very simple piece of code creating a QMainWindow, with a central empty QWidget: import sys from PyQt5.QtWidgets import QWidget class MyWidget(QWidget): """QWidget ...
jpo38's user avatar
  • 21.9k
0 votes
1 answer
76 views

Python 3.12.3, Celery 5.3.6, Django 4.2.11, Ubuntu 22.04.4 I have an infrastructure of Django and Celery servers running simultaneously on an Ubuntu server. For logging I use DiscordHandler and ...
whatserface's user avatar
1 vote
1 answer
69 views

I am currently developing a core utils package where I want to set some logging properties (I know that this is not best practice, but it´s for interal purposes and intended to generate logs). When I ...
Bennimi's user avatar
  • 526
2 votes
1 answer
261 views

I'm using a Python library that logs messages using the standard logging module. The library code includes the following at the top of its modules: import logging logger = logging.getLogger(__name__) ...
SWA's user avatar
  • 57
-3 votes
2 answers
271 views

I am using python logging to write debug information to a file and print it to my screen : logger=logging.getLogger() logger.setLevel(logging.INFO) file_handler = logging.FileHandler("std.log&...
FábioRB's user avatar
  • 457
0 votes
1 answer
64 views

I do not seem to be able to make logging work. The following does not print anything to console. I have been digging into the official documentation, SO, and even Reddit... and nothing seems to work ...
Fi Li Ppo's user avatar
  • 302
0 votes
1 answer
79 views

I have a python class wrapper to the logging functionality. My problem with these solutions is the logging options "%(asctime)s:[%(filename)s->%(funcName)s():%(lineno)s] %(levelname)s>> %...
Edgar O's user avatar
  • 17
0 votes
0 answers
130 views

Question How to make a python tkinter app close gracefully at the end of normal operation and if user terminates the window interrupting the processing being performed? Details The tkinter app ...
Buzz B's user avatar
  • 147
0 votes
1 answer
65 views

Considering the following errornous function: def inner(): raise Exception("message") If I run the function I get an error like: Traceback (most recent call last): File "/...
paul23's user avatar
  • 9,647
1 vote
1 answer
161 views

I have an application using lots of different packages and many of them are logging output. I would like to clean up my application's logs and perhaps disable some of the other packages' output. My ...
Thomas Arildsen's user avatar
-1 votes
2 answers
62 views

I am stuck at situation where i have to emit logs in different format based on condition like security events, normal software operation events etc to the std out. example lets say security events ...
abak1802's user avatar
  • 107
0 votes
0 answers
58 views

I have been trying to setup logging using the logging module in a Python script, and I have got it working properly. It can now log to both the console and a log file. But if fails when I setup a Dask ...
RogUE's user avatar
  • 363
4 votes
1 answer
64 views

I am trying to write a custom logging.Logger subclass which is mostly working, but I run into issues when trying to use a logging.Formatter that includes the interpolated value %(filename) in the ...
OmniZ's user avatar
  • 143
1 vote
1 answer
72 views

I want to be able to set python logging level to DEBUG when I am debugging the application, without stopping it. I wrote a signal handler which toggles the level. Is this a valid approach? ...
trasadasyu's user avatar
3 votes
2 answers
126 views

When using Python logging, asctime is very handy in looking at the hotspots in code. However, I have to decode or post-process the log to show incremental time taken between each log message. logging....
Krishna's user avatar
  • 1,632
0 votes
0 answers
155 views

I am trying to output the errors, if there are any in the code, and also the results of the stored procedure in my log file. The log file is created but it is empty. I have other logging in my code ...
Forgottenluv's user avatar
0 votes
1 answer
162 views

I have a PySide6 application that uses threading and logging. My logger has a custom handler defined below, which pops up a messagebox that requires user attention for higher level logging events: ...
KBriggs's user avatar
  • 1,498
0 votes
1 answer
70 views

I am running a python script as a different user with the runas command but I cannot see my output/errors anywhere. I am trying to debug my script, but I cannot see any logging info so it is near ...
iBeMeltin's user avatar
  • 2,237
1 vote
1 answer
57 views

logging.basicConfig( filename=f"{output_location}/log.txt", format="{asctime} - {levelname} - {filename}: {message}", datefmt = "%d %b %H:%M", ...
AlphabetsAlphabets's user avatar
0 votes
2 answers
140 views

I have a working logger module built on DBR 10.4/python 3.8 platform that creates the log and periodically export to a blob storage. Recently we've moved to DBR 15.2/python 3.11, and now the logger ...
ArniBandyo's user avatar
-1 votes
1 answer
36 views

Don't the different logging levels in Python (v3.11.4) logging work for a file and for telegrams? So the logs of the WARNING level and above go both to the Telegram and to the file, and the logs of ...
8j0rn's user avatar
  • 1
0 votes
2 answers
299 views

I am using SeleniumWire, Django, Celery for parsing I have a lot of redundant logs from selenium-wire. I mean logs: Capturing request: sitename Capturing response: sitename 200 OK I want to hide ...
mascai's user avatar
  • 1,738
0 votes
0 answers
398 views

I am currently trying to log using the SMTPHandler class from Python's logging module. The logger is instantiated just fine, but fails when calling _socket.getaddrinfo even though it is being passed ...
dabo_tusev's user avatar
1 vote
1 answer
78 views

I am currently working on some Python code that will be executed by a larger C# web project. The C# code uses NLog to create log files. I have got my Python logger logging to the same file. Also, I ...
ysi_d's user avatar
  • 71
3 votes
1 answer
90 views

When using Python's built-in logging module, I see most examples access the log using something like log = logging.getLogger('SomeName'), across different modules/files in a program. You can do this ...
Durgan's user avatar
  • 111
-1 votes
1 answer
43 views

In a Django application, version 3.2.14, running on an ec2 instance that also has a gunicorn web server with 9 workers, plus ngnix and with the log configuration shown below, the files are not rotated....
Diego Carabajal's user avatar

1
2 3 4 5
19