Z
Z
zlodiak2019-12-07 19:53:33
Python
zlodiak, 2019-12-07 19:53:33

Where to watch logs?

Let's say in a python file there are several sql queries combined into a transaction. Let's say something went wrong and the script didn't work. At the same time, nothing was displayed in the console to help determine the essence of the error.
Please tell me how to look for information about the causes of the error in such cases?
First, I looked at the postgres logs here: /var/log/postgresql
I don't understand where to look for python logs. What other methods can be tried to determine the cause of the error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-12-07
@zlodiak

in general, python does not write logs - it just sends it to stderr, and redirecting this stream to a log or simply utilizing it is on the conscience of the developers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question