[agent]-[executor] optimize the command log collect algrothnm
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
. "C:\Users\wdd\IdeaProjects\ProjectOctopus\source\src\main\java\io\wdd\source\shell\lib\wdd-lib-log.sh"
|
||||
. /root/IdeaProjects/ProjectOctopus/source/src/main/java/io/wdd/source/shell/lib/wdd-lib-log.sh
|
||||
|
||||
. /root/IdeaProjects/ProjectOctopus/source/src/main/java/io/wdd/source/shell/lib/wdd-lib-env.sh
|
||||
|
||||
|
||||
|
||||
log "wdd is awesome !"
|
||||
log "wdd is awesome !"
|
||||
error "error message"
|
||||
|
||||
debug "debug message"
|
||||
info "woshinibaba!"
|
||||
|
||||
|
||||
debug "-------------------"
|
||||
|
||||
log "env TEST_ENV is $(env | grep TEST_ENV)"
|
||||
|
||||
TEST_ENV=cccc
|
||||
log "env TEST_ENV is $(env | grep TEST_ENV)"
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
export TEST_ENV="${TEST_ENV}_.txt"
|
||||
@@ -37,7 +37,7 @@ stderr_print() {
|
||||
# None
|
||||
#########################
|
||||
log() {
|
||||
stderr_print "${CYAN}${MODULE:-} ${MAGENTA}$(date "+%T.%2N ")${RESET}${*}"
|
||||
stderr_print "${CYAN}${MODULE:-} ${MAGENTA}$(date "+%Y-%m-%d %H:%M:%S.%2N ")${RESET}${*}"
|
||||
}
|
||||
########################
|
||||
# Log an 'info' message
|
||||
@@ -80,7 +80,7 @@ error() {
|
||||
#########################
|
||||
debug() {
|
||||
# 'is_boolean_yes' is defined in libvalidations.sh, but depends on this file so we cannot source it
|
||||
local bool="${BITNAMI_DEBUG:-false}"
|
||||
local bool="${BITNAMI_DEBUG:-true}"
|
||||
# comparison is performed without regard to the case of alphabetic characters
|
||||
shopt -s nocasematch
|
||||
if [[ "$bool" = 1 || "$bool" =~ ^(yes|true)$ ]]; then
|
||||
|
||||
Reference in New Issue
Block a user