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 #####
|
##### Logging settings #####
|
||||||
##########################################
|
##########################################
|
||||||
# The location of the master log file
|
# The location of the master log file
|
||||||
log_file: {{SALT_LOGS_DIR}}/salt/master
|
log_file: {{SALT_LOGS_DIR}}/salt/master.log
|
||||||
key_logfile: {{SALT_LOGS_DIR}}/salt/key
|
key_logfile: {{SALT_LOGS_DIR}}/salt/key.log
|
||||||
|
|
||||||
# The level of messages to send to the console.
|
# The level of messages to send to the console.
|
||||||
# One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
|
# One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'.
|
||||||
|
|||||||
@@ -434,7 +434,7 @@ function configure_salt_api()
|
|||||||
##### salt-api settings #####
|
##### salt-api settings #####
|
||||||
##########################################
|
##########################################
|
||||||
# Basic configuration for salt-api
|
# Basic configuration for salt-api
|
||||||
api_logfile: ${SALT_LOGS_DIR}/salt/api
|
api_logfile: ${SALT_LOGS_DIR}/salt/api.log
|
||||||
|
|
||||||
rest_cherrypy:
|
rest_cherrypy:
|
||||||
port: 8000
|
port: 8000
|
||||||
@@ -574,7 +574,7 @@ EOF
|
|||||||
|
|
||||||
# configure salt master, minion and key log rotation
|
# configure salt master, minion and key log rotation
|
||||||
cat > /etc/logrotate.d/salt <<EOF
|
cat > /etc/logrotate.d/salt <<EOF
|
||||||
${SALT_LOGS_DIR}/salt/master {
|
${SALT_LOGS_DIR}/salt/master.log {
|
||||||
${SALT_LOG_ROTATE_FREQUENCY}
|
${SALT_LOG_ROTATE_FREQUENCY}
|
||||||
missingok
|
missingok
|
||||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||||
@@ -582,15 +582,7 @@ ${SALT_LOGS_DIR}/salt/master {
|
|||||||
notifempty
|
notifempty
|
||||||
}
|
}
|
||||||
|
|
||||||
${SALT_LOGS_DIR}/salt/minion {
|
${SALT_LOGS_DIR}/salt/key.log {
|
||||||
${SALT_LOG_ROTATE_FREQUENCY}
|
|
||||||
missingok
|
|
||||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
|
||||||
compress
|
|
||||||
notifempty
|
|
||||||
}
|
|
||||||
|
|
||||||
${SALT_LOGS_DIR}/salt/key {
|
|
||||||
${SALT_LOG_ROTATE_FREQUENCY}
|
${SALT_LOG_ROTATE_FREQUENCY}
|
||||||
missingok
|
missingok
|
||||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||||
@@ -603,7 +595,7 @@ EOF
|
|||||||
# configure salt-api log rotation
|
# configure salt-api log rotation
|
||||||
cat >> /etc/logrotate.d/salt <<EOF
|
cat >> /etc/logrotate.d/salt <<EOF
|
||||||
|
|
||||||
${SALT_LOGS_DIR}/salt/api {
|
${SALT_LOGS_DIR}/salt/api.log {
|
||||||
${SALT_LOG_ROTATE_FREQUENCY}
|
${SALT_LOG_ROTATE_FREQUENCY}
|
||||||
missingok
|
missingok
|
||||||
rotate ${SALT_LOG_ROTATE_RETENTION}
|
rotate ${SALT_LOG_ROTATE_RETENTION}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ function container_log()
|
|||||||
function master_log()
|
function master_log()
|
||||||
{
|
{
|
||||||
local LOGS_DIR="${SCRIPT_PATH}/logs"
|
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
|
[[ -f "${SALT_MASTER_LOG}" ]] || return 0
|
||||||
echo "📝 salt-master log (${SALT_MASTER_LOG})"
|
echo "📝 salt-master log (${SALT_MASTER_LOG})"
|
||||||
|
|||||||
Reference in New Issue
Block a user