diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-08-26 15:39:08 +0200 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-08-26 15:39:08 +0200 |
commit | 8a9cf32e8e55307ae4df3fb1ad17280c7ab0c28b (patch) | |
tree | 925b7a9d0d3e5dd3337e716f3aabd5374b50f1ed | |
parent | 7ee990ff728753741911935a4eb499559737a214 (diff) | |
download | midipix_build-8a9cf32e8e55307ae4df3fb1ad17280c7ab0c28b.tar.bz2 midipix_build-8a9cf32e8e55307ae4df3fb1ad17280c7ab0c28b.tar.xz |
{build,pkgtool}.sh: log environment variables at "notice" level.
subr.rtl/rtl_log.subr:${RTL_LOG_MSG_{NOTICE,VERBOSE}_COLOUR}: swap.
-rwxr-xr-x | build.sh | 4 | ||||
-rwxr-xr-x | pkgtool.sh | 4 | ||||
-rw-r--r-- | subr.rtl/rtl_log.subr | 10 |
3 files changed, 9 insertions, 9 deletions
@@ -79,7 +79,7 @@ buildp_dispatch_pkg_state() { rtl_log_msg info_end "[%3d%%/%3d%%] [%03d/%03d] Finished \`%s' build." "${7}" "${6}" "${4}" "${5}" "${_pkg_name}"; ;; start_pkg_child) if [ "${PKG_NO_LOG_VARS:-0}" -eq 0 ]; then - rtl_log_env_vars "build" $(rtl_get_vars_fast "^PKG_"); + rtl_log_env_vars "notice" "build" $(rtl_get_vars_fast "^PKG_"); fi; if rtl_lmatch "${ARG_VERBOSE_LEVELS}" "xtrace" ","; then set -o xtrace; @@ -130,7 +130,7 @@ build() { else trap "buildp_ast exit" EXIT; trap "buildp_ast abort" HUP INT TERM USR1 USR2; buildp_time_init; rtl_log_msg info "Build started by %s@%s at %s." "${BUILD_USER}" "${BUILD_HNAME}" "${BUILD_DATE_START}"; - rtl_log_env_vars "build (global)" ${DEFAULT_LOG_ENV_VARS}; + rtl_log_env_vars "notice" "build (global)" ${DEFAULT_LOG_ENV_VARS}; ex_pkg_dispatch "${DEFAULT_BUILD_STEPS}" "${DEFAULT_BUILD_VARS}" \ buildp_dispatch "${BUILD_GROUPS}" "${BUILD_GROUPS_INHIBIT_DEPS}" \ "${ARG_PARALLEL}" "${BUILD_WORKDIR}/build.fifo" "${ARG_RESTART}" \ @@ -15,7 +15,7 @@ pkgtoolp_info() { "${_group_name}" 1 "${_pkg_name}" "" "${BUILD_WORKDIR}"; then _rc=1; _status="Error: failed to set package environment for \`${_pkg_name}'."; else _pkg_version="$(rtl_get_var_unsafe -u "PKG_"${_pkg_name}"_VERSION")"; - rtl_log_env_vars "package" $(rtl_get_vars_fast "^PKG_${_pkg_name_uc}"); + rtl_log_env_vars "notice" "package" $(rtl_get_vars_fast "^PKG_${_pkg_name_uc}"); rtl_log_msg info "Build group: %s" "${_group_name}"; if [ -z "${PKG_DEPENDS:-}" ]; then rtl_log_msg info "Package \`%s' has no dependencies." "${_pkg_name}"; @@ -186,7 +186,7 @@ pkgtoolp_shell() { local _pkg_name="${1}" _rc=0; _status=""; if ! ex_pkg_load_dump "${_pkg_name}" "${BUILD_WORKDIR}"; then _rc=1; _status="${_status}"; - else rtl_log_env_vars "package" $(rtl_get_vars_fast "^PKG_"); + else rtl_log_env_vars "notice" "package" $(rtl_get_vars_fast "^PKG_"); rtl_log_msg info "Launching shell \`%s' within package environment and \`%s'." "${SHELL}" "${PKG_BUILD_DIR}"; rtl_log_msg info "Run \$R to rebuild \`%s'." "${_pkg_name}"; rtl_log_msg info "Run \$RS <step> to restart the specified build step of \`%s'" "${_pkg_name}"; diff --git a/subr.rtl/rtl_log.subr b/subr.rtl/rtl_log.subr index cc692795..3e55ab85 100644 --- a/subr.rtl/rtl_log.subr +++ b/subr.rtl/rtl_log.subr @@ -33,17 +33,17 @@ RTL_LOG_MSG_SUCCESS_COLOUR=33; # Dark yellow RTL_LOG_MSG_SUCCESS_END_COLOUR=32; # Dark green RTL_LOG_MSG_INFO_COLOUR=93; # Bright yellow RTL_LOG_MSG_INFO_END_COLOUR=92; # Bright green -RTL_LOG_MSG_NOTICE_COLOUR=96; # Bright cyan -RTL_LOG_MSG_VERBOSE_COLOUR=90; # Dark grey +RTL_LOG_MSG_NOTICE_COLOUR=90; # Dark grey +RTL_LOG_MSG_VERBOSE_COLOUR=96; # Bright cyan RTL_LOG_MSG_DEBUG_COLOUR=36; # Dark cyan rtl_log_env_vars() { - local _arg_len_max=0; - rtl_log_msg info "Variables for this ${1:-build}:"; shift; + local _level="${1}" _type="${2}" _arg_len_max=0; shift 2; + rtl_log_msg "${_level}" "Variables for this ${_type}:"; _arg_len_max="$(rtl_lmax "${@}")"; while [ "${#}" -gt 0 ]; do - rtl_log_msg info \ + rtl_log_msg "${_level}" \ "%${_arg_len_max}.${_arg_len_max}s=%s" \ "${1%%=*}" "$(rtl_get_var_unsafe "${1#*=}")"; shift; |