We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac21a1d commit c991e5bCopy full SHA for c991e5b
main.py
@@ -11,8 +11,19 @@
11
from atlassian.adf import AtlassianDocumentFormatBuilder
12
from utils.utils import Utils
13
14
-logging.basicConfig()
15
-logger = logging.getLogger(__name__)
+# Setting up the logging level from the environment variable `LOGLEVEL`.
+if 'LOG_FILENAME' in environ.keys():
16
+ logging.basicConfig(
17
+ filename=environ['LOG_FILENAME'],
18
+ filemode='a',
19
+ format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
20
+ datefmt='%H:%M:%S'
21
+ )
22
+ logger = logging.getLogger(__name__)
23
+else:
24
+ logging.basicConfig()
25
26
+
27
logger.setLevel(environ['LOG_LEVEL'] if 'LOG_LEVEL' in environ.keys() else 'INFO')
28
29
def main():
0 commit comments