mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
cscli machines: lint + write output to stdout instead of log (#2657)
* feedback on stdout, not log.Info * rename parameters to silence warnings from "unusedparams" * debian postinst: skip duplicate warnings with 'cscli machines add' * rpm postinst: skip duplicate warnings in 'cscli machines add' * update func tests * debian prerm: if dashboard remove fails, explain it's ok * debian prerm: suppress warnings about wal, capi when attempting to remove the dashboard * wizard.sh: log format like crowdsec
This commit is contained in:
parent
6eabb461ce
commit
12d9fba4b3
7 changed files with 39 additions and 39 deletions
10
wizard.sh
10
wizard.sh
|
@ -95,33 +95,33 @@ rm -rf -- "$BACKUP_DIR"
|
|||
|
||||
log_info() {
|
||||
msg=$1
|
||||
date=$(date +%x:%X)
|
||||
date=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
echo -e "${BLUE}INFO${NC}[${date}] crowdsec_wizard: ${msg}"
|
||||
}
|
||||
|
||||
log_fatal() {
|
||||
msg=$1
|
||||
date=$(date +%x:%X)
|
||||
date=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
echo -e "${RED}FATA${NC}[${date}] crowdsec_wizard: ${msg}" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
log_warn() {
|
||||
msg=$1
|
||||
date=$(date +%x:%X)
|
||||
date=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
echo -e "${ORANGE}WARN${NC}[${date}] crowdsec_wizard: ${msg}"
|
||||
}
|
||||
|
||||
log_err() {
|
||||
msg=$1
|
||||
date=$(date +%x:%X)
|
||||
date=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
echo -e "${RED}ERR${NC}[${date}] crowdsec_wizard: ${msg}" 1>&2
|
||||
}
|
||||
|
||||
log_dbg() {
|
||||
if [[ ${DEBUG_MODE} == "true" ]]; then
|
||||
msg=$1
|
||||
date=$(date +%x:%X)
|
||||
date=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
echo -e "[${date}][${YELLOW}DBG${NC}] crowdsec_wizard: ${msg}" 1>&2
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue