1

Earlier in google app engine python2 standard environment the stack driver logging for request where correlated and it had module name and line number for the respective logs.

enter image description here

Migrating the codebase to python3, our team had a challenge. We were not able to print correlated logs with the module name and line number. The logs are printing as such in the below image.

enter image description here

Is there any possible way to print the correlated logs with the module name and line number. We would be more thankful if the solution is in python3.

Praveen Kumar
  • 91
  • 1
  • 5

1 Answers1

0

It is stated in the App Engine Python 3.7 logging docs that what is visible in the Logs Viewer is the content of stdout and stderr. This is the default way of logging in Python.

In order to show the line number and module in the logs, you should use the Python logging formatter. You can see how to give format to the logs in the following SO post

Jose V
  • 1,356
  • 1
  • 4
  • 12