Hi!
I have quite some experience (1.5 years) writing code in Python. I am self-taught and I am developing a Python application at my full-time job. Now, briefly what my application does, is that it takes in some documents and videos, processes their content, summarizes them (using Gen AI), and creates a fresh document out of them.
All these things work fine. I process each of the job individually, uniquely identified by a job ID. The issue is in logging. When two or more jobs are triggered by different users in parallel in Dev or QA server, the log statements mix up between the files. I am writing the job ids in each of the log statement and I could see the statements from, say ID: 100, in the log file for ID: 101, named ‘logs_101.log’. I have tried all solutions suggested on Stack overflow, on Google, GPT, etc. I am not able to solve this issue.
Could you guys, provide me a solution for this issue? I am using the default logging module in Python and have defined a custom logging class that defines a custom logger for each job ID (I am unable to provide the code as it is in my work system)
I will try to attach screenshots in the reply if possible
submitted by /u/waltzraghu
[link] [comments]
r/learnpython Hi! I have quite some experience (1.5 years) writing code in Python. I am self-taught and I am developing a Python application at my full-time job. Now, briefly what my application does, is that it takes in some documents and videos, processes their content, summarizes them (using Gen AI), and creates a fresh document out of them. All these things work fine. I process each of the job individually, uniquely identified by a job ID. The issue is in logging. When two or more jobs are triggered by different users in parallel in Dev or QA server, the log statements mix up between the files. I am writing the job ids in each of the log statement and I could see the statements from, say ID: 100, in the log file for ID: 101, named ‘logs_101.log’. I have tried all solutions suggested on Stack overflow, on Google, GPT, etc. I am not able to solve this issue. Could you guys, provide me a solution for this issue? I am using the default logging module in Python and have defined a custom logging class that defines a custom logger for each job ID (I am unable to provide the code as it is in my work system) I will try to attach screenshots in the reply if possible submitted by /u/waltzraghu [link] [comments]
Hi!
I have quite some experience (1.5 years) writing code in Python. I am self-taught and I am developing a Python application at my full-time job. Now, briefly what my application does, is that it takes in some documents and videos, processes their content, summarizes them (using Gen AI), and creates a fresh document out of them.
All these things work fine. I process each of the job individually, uniquely identified by a job ID. The issue is in logging. When two or more jobs are triggered by different users in parallel in Dev or QA server, the log statements mix up between the files. I am writing the job ids in each of the log statement and I could see the statements from, say ID: 100, in the log file for ID: 101, named ‘logs_101.log’. I have tried all solutions suggested on Stack overflow, on Google, GPT, etc. I am not able to solve this issue.
Could you guys, provide me a solution for this issue? I am using the default logging module in Python and have defined a custom logging class that defines a custom logger for each job ID (I am unable to provide the code as it is in my work system)
I will try to attach screenshots in the reply if possible
submitted by /u/waltzraghu
[link] [comments]