Skip to content

Commit 4b40471

Browse files
committed
Swift: reconfigure default logging in qltest.sh
Route all logging to console by default, which ends up in the qltest.log file.
1 parent 61bb6c9 commit 4b40471

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

swift/tools/qltest.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ QLTEST_LOG="$CODEQL_EXTRACTOR_SWIFT_LOG_DIR"/qltest.log
66

77
EXTRACTOR="$CODEQL_EXTRACTOR_SWIFT_ROOT/tools/$CODEQL_PLATFORM/extractor"
88
SDK="$CODEQL_EXTRACTOR_SWIFT_ROOT/qltest/$CODEQL_PLATFORM/sdk"
9+
export CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS=${CODEQL_EXTRACTOR_SWIFT_LOG_LEVELS:-out:text:no_logs,out:console:info}
910

1011
for src in *.swift; do
1112
env=()
@@ -14,7 +15,7 @@ for src in *.swift; do
1415
expected_status=$(sed -n 's=//codeql-extractor-expected-status:[[:space:]]*==p' $src)
1516
expected_status=${expected_status:-0}
1617
env+=($(sed -n '1 s=//codeql-extractor-env:==p' $src))
17-
echo -e "calling extractor with flags: ${opts[@]}\n" >> $QLTEST_LOG
18+
echo >> $QLTEST_LOG
1819
env "${env[@]}" "$EXTRACTOR" "${opts[@]}" >> $QLTEST_LOG 2>&1
1920
actual_status=$?
2021
if [[ $actual_status != $expected_status ]]; then

0 commit comments

Comments
 (0)