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):
7979 log .setLevel (logging .INFO )
8080
8181
82+ def dump_env ():
83+ if log .isEnabledFor (DUMP_ENV ):
84+ log .debug ('ENV: %s' , json .dumps (dict (os .environ ), indent = 2 ))
85+
86+
8287################################################################################
8388# Backports
8489
@@ -926,8 +931,7 @@ def prepare_command(args):
926931 # Load the query.
927932 query_data = json .load (sys .stdin )
928933
929- if log .isEnabledFor (DUMP_ENV ):
930- log .debug ('ENV: %s' , json .dumps (dict (os .environ ), indent = 2 ))
934+ dump_env ()
931935 if log .isEnabledFor (DEBUG2 ):
932936 if log .isEnabledFor (DEBUG3 ):
933937 log .debug ('QUERY: %s' , json .dumps (query_data , indent = 2 ))
@@ -1016,8 +1020,7 @@ def build_command(args):
10161020
10171021 log = logging .getLogger ('build' )
10181022
1019- if log .isEnabledFor (DEBUG3 ):
1020- log .debug ('ENV: %s' , json .dumps (dict (os .environ ), indent = 2 ))
1023+ dump_env ()
10211024 if log .isEnabledFor (DEBUG2 ):
10221025 log .debug ('CMD: python3 %s' , shlex_join (sys .argv ))
10231026
You can’t perform that action at this time.
0 commit comments