feat: Add .log extension to master and api log files
This commit is contained in:
committed by
Carlos D. Álvaro
parent
83214cc23b
commit
2e0fe50216
@@ -117,8 +117,8 @@ syndic_log_file: {{SALT_LOGS_DIR}}/salt/syndic
|
||||
##### Logging settings #####
|
||||
##########################################
|
||||
# The location of the master log file
|
||||
log_file: {{SALT_LOGS_DIR}}/salt/master
|
||||
key_logfile: {{SALT_LOGS_DIR}}/salt/key
|
||||
log_file: {{SALT_LOGS_DIR}}/salt/master.log
|
||||
key_logfile: {{SALT_LOGS_DIR}}/salt/key.log
|
||||
|
||||
# The level of messages to send to the console.
|
||||
# One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
|
||||
|
||||
@@ -434,7 +434,7 @@ function configure_salt_api()
|
||||
##### salt-api settings #####
|
||||
##########################################
|
||||
# Basic configuration for salt-api
|
||||
api_logfile: ${SALT_LOGS_DIR}/salt/api
|
||||
api_logfile: ${SALT_LOGS_DIR}/salt/api.log
|
||||
|
||||
rest_cherrypy:
|
||||
port: 8000
|
||||
@@ -574,7 +574,7 @@ EOF
|
||||
|
||||
# configure salt master, minion and key log rotation
|
||||
cat > /etc/logrotate.d/salt <<EOF
|
||||
${SALT_LOGS_DIR}/salt/master {
|
||||
${SALT_LOGS_DIR}/salt/master.log {
|
||||
${SALT_LOG_ROTATE_FREQUENCY}
|
||||
missingok
|
||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||
@@ -582,15 +582,7 @@ ${SALT_LOGS_DIR}/salt/master {
|
||||
notifempty
|
||||
}
|
||||
|
||||
${SALT_LOGS_DIR}/salt/minion {
|
||||
${SALT_LOG_ROTATE_FREQUENCY}
|
||||
missingok
|
||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||
compress
|
||||
notifempty
|
||||
}
|
||||
|
||||
${SALT_LOGS_DIR}/salt/key {
|
||||
${SALT_LOGS_DIR}/salt/key.log {
|
||||
${SALT_LOG_ROTATE_FREQUENCY}
|
||||
missingok
|
||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||
@@ -603,7 +595,7 @@ EOF
|
||||
# configure salt-api log rotation
|
||||
cat >> /etc/logrotate.d/salt <<EOF
|
||||
|
||||
${SALT_LOGS_DIR}/salt/api {
|
||||
${SALT_LOGS_DIR}/salt/api.log {
|
||||
${SALT_LOG_ROTATE_FREQUENCY}
|
||||
missingok
|
||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||
|
||||
@@ -127,7 +127,7 @@ function container_log()
|
||||
function master_log()
|
||||
{
|
||||
local LOGS_DIR="${SCRIPT_PATH}/logs"
|
||||
local SALT_MASTER_LOG="${LOGS_DIR}/salt/master"
|
||||
local SALT_MASTER_LOG="${LOGS_DIR}/salt/master.log"
|
||||
|
||||
[[ -f "${SALT_MASTER_LOG}" ]] || return 0
|
||||
echo "📝 salt-master log (${SALT_MASTER_LOG})"
|
||||
|
||||
Reference in New Issue
Block a user