Initialize all log-related ASAP

This commit is contained in:
Marco Ferrari 2020-09-29 22:46:24 +02:00
parent 9371fab670
commit 973bfdea8e
2 changed files with 5 additions and 2 deletions

View file

@ -17,6 +17,9 @@ ACTIONS_RUNNER_DEBUG="${ACTIONS_RUNNER_DEBUG:-false}" # Boolean to see even more
# Log Vars # # Log Vars #
# Define these early, so we can use debug logging ASAP if needed # # Define these early, so we can use debug logging ASAP if needed #
################################################################## ##################################################################
LOG_FILE="${LOG_FILE:-super-linter.log}" # Default log file name (located in GITHUB_WORKSPACE folder)
LOG_LEVEL="${LOG_LEVEL:-VERBOSE}" # Default log level (VERBOSE, DEBUG, TRACE)
if [[ ${ACTIONS_RUNNER_DEBUG} == true ]]; then LOG_LEVEL="DEBUG"; fi if [[ ${ACTIONS_RUNNER_DEBUG} == true ]]; then LOG_LEVEL="DEBUG"; fi
# Boolean to see trace logs # Boolean to see trace logs
LOG_TRACE=$(if [[ ${LOG_LEVEL} == "TRACE" ]]; then echo "true"; fi) LOG_TRACE=$(if [[ ${LOG_LEVEL} == "TRACE" ]]; then echo "true"; fi)
@ -189,8 +192,6 @@ GITHUB_SHA="${GITHUB_SHA}" # GitHub sh
GITHUB_TOKEN="${GITHUB_TOKEN}" # GitHub Token passed from environment GITHUB_TOKEN="${GITHUB_TOKEN}" # GitHub Token passed from environment
GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace
KUBERNETES_DIRECTORY="${KUBERNETES_DIRECTORY}" # Kubernetes directory KUBERNETES_DIRECTORY="${KUBERNETES_DIRECTORY}" # Kubernetes directory
LOG_FILE="${LOG_FILE:-super-linter.log}" # Default log file name (located in GITHUB_WORKSPACE folder)
LOG_LEVEL="${LOG_LEVEL:-VERBOSE}" # Default log level (VERBOSE, DEBUG, TRACE)
MULTI_STATUS="${MULTI_STATUS:-true}" # Multiple status are created for each check ran MULTI_STATUS="${MULTI_STATUS:-true}" # Multiple status are created for each check ran
TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases
VALIDATE_ALL_CODEBASE="${VALIDATE_ALL_CODEBASE}" # Boolean to validate all files VALIDATE_ALL_CODEBASE="${VALIDATE_ALL_CODEBASE}" # Boolean to validate all files

View file

@ -359,6 +359,8 @@ function TestCodebase() {
INDIVIDUAL_TEST_FOLDER="${5}" # Folder for specific tests INDIVIDUAL_TEST_FOLDER="${5}" # Folder for specific tests
TESTS_RAN=0 # Incremented when tests are ran, this will help find failed finds TESTS_RAN=0 # Incremented when tests are ran, this will help find failed finds
debug "Running ${FILE_TYPE} test. Linter name: ${LINTER_NAME}, linter command: ${LINTER_COMMAND}, file extensions: ${FILE_EXTENSIONS}, individual test folder: ${INDIVIDUAL_TEST_FOLDER}"
################ ################
# print header # # print header #
################ ################