8000 Separated enabling Debugger and changing log level (#2518) · lwander/python-docs-samples@9b694aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b694aa

Browse files
Willengelke
authored andcommitted
Separated enabling Debugger and changing log level (GoogleCloudPlatform#2518)
* Add quickstart sample app for cloud debugger * Update cloud_debugger sampe app text * Missed trailing newline * Take out logging level from the try/catch block * Update comment
1 parent 7f6027b commit 9b694aa

File tree

1 file changed

+4
-4
lines changed
  • appengine/standard_python37/cloud_debugger

1 file changed

+4
-4
lines changed

appengine/standard_python37/cloud_debugger/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
# [START gae_python37_app]
1616
from flask import Flask, request
1717

18-
1918
# Enable cloud debugger
20-
# Adjust logging level to INFO
2119
try:
2220
import googleclouddebugger
2321
googleclouddebugger.enable()
24-
import logging
25-
logging.basicConfig(level=logging.INFO)
2622
except ImportError:
2723
pass
2824

25+
# Adjust logging level to INFO
26+
import logging
27+
logging.basicConfig(level=logging.INFO)
28+
2929
# If `entrypoint` is not defined in app.yaml, App Engine will look for an app
3030
# called `app` in `main.py`.
3131
app = Flask(__name__)

0 commit comments

Comments
 (0)
0