File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ def formatMessage(self, record):
79
79
log .setLevel (logging .INFO )
80
80
81
81
82
+ def dump_env ():
83
+ if log .isEnabledFor (DUMP_ENV ):
84
+ log .debug ('ENV: %s' , json .dumps (dict (os .environ ), indent = 2 ))
85
+
86
+
82
87
################################################################################
83
88
# Backports
84
89
@@ -926,8 +931,7 @@ def prepare_command(args):
926
931
# Load the query.
927
932
query_data = json .load (sys .stdin )
928
933
929
- if log .isEnabledFor (DUMP_ENV ):
930
- log .debug ('ENV: %s' , json .dumps (dict (os .environ ), indent = 2 ))
934
+ dump_env ()
931
935
if log .isEnabledFor (DEBUG2 ):
932
936
if log .isEnabledFor (DEBUG3 ):
933
937
log .debug ('QUERY: %s' , json .dumps (query_data , indent = 2 ))
@@ -1016,8 +1020,7 @@ def build_command(args):
1016
1020
1017
1021
log = logging .getLogger ('build' )
1018
1022
1019
- if log .isEnabledFor (DEBUG3 ):
1020
- log .debug ('ENV: %s' , json .dumps (dict (os .environ ), indent = 2 ))
1023
+ dump_env ()
1021
1024
if log .isEnabledFor (DEBUG2 ):
1022
1025
log .debug ('CMD: python3 %s' , shlex_join (sys .argv ))
1023
1026
You can’t perform that action at this time.
0 commit comments