Turn on logging for elastic-recheck
* modules/elastic_recheck/files/elastic-recheck.init: Minor whitespace cleanup for space-before-tab indent on a comment line. * modules/elastic_recheck/files/logging.config: New logging configuration file for elastic-recheck IRC bot. * modules/elastic_recheck/manifests/init.pp: Install the new logging configuration file. * modules/elastic_recheck/templates/elastic-recheck.conf.erb: Tell the IRC bot to use the new logging configuration file. Change-Id: I47cabb01df209c9f020846bcb272b9a2f796b0e5
This commit is contained in:
parent
942e5f1dfb
commit
d1bd696b56
@ -134,7 +134,7 @@ case "$1" in
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
|
52
modules/elastic_recheck/files/logging.config
Normal file
52
modules/elastic_recheck/files/logging.config
Normal file
@ -0,0 +1,52 @@
|
||||
[loggers]
|
||||
keys=root,recheckwatchbot,elastic-recheck,irc
|
||||
|
||||
[handlers]
|
||||
keys=console,debug,normal
|
||||
|
||||
[formatters]
|
||||
keys=simple
|
||||
|
||||
[logger_root]
|
||||
level=INFO
|
||||
handlers=console,debug,normal
|
||||
|
||||
[logger_elastic-recheck]
|
||||
level=DEBUG
|
||||
handlers=console,debug,normal
|
||||
qualname=elastic-recheck
|
||||
propagate=0
|
||||
|
||||
[logger_recheckwatchbot]
|
||||
level=DEBUG
|
||||
handlers=console,debug,normal
|
||||
qualname=elastic-recheck
|
||||
propagate=0
|
||||
|
||||
[logger_irc]
|
||||
level=INFO
|
||||
handlers=console,debug,normal
|
||||
qualname=irc
|
||||
propagate=0
|
||||
|
||||
[handler_console]
|
||||
level=WARNING
|
||||
class=StreamHandler
|
||||
formatter=simple
|
||||
args=(sys.stdout,)
|
||||
|
||||
[handler_debug]
|
||||
level=DEBUG
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('/var/log/elastic-recheck/elastic-recheck_debug.log', 'midnight', 1, 30,)
|
||||
|
||||
[handler_normal]
|
||||
level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('/var/log/elastic-recheck/elastic-recheck.log', 'midnight', 1, 30,)
|
||||
|
||||
[formatter_simple]
|
||||
format=%(asctime)s %(levelname)s %(name)s: %(message)s
|
||||
datefmt=
|
@ -87,6 +87,15 @@ class elastic_recheck (
|
||||
require => File['/etc/elastic-recheck'],
|
||||
}
|
||||
|
||||
file { '/etc/elastic-recheck/logging.config':
|
||||
ensure => present,
|
||||
mode => '0640',
|
||||
owner => 'recheck',
|
||||
group => 'recheck',
|
||||
source => 'puppet:///modules/elastic_recheck/logging.config',
|
||||
require => File['/etc/elastic-recheck'],
|
||||
}
|
||||
|
||||
file { '/etc/elastic-recheck/recheckwatchbot.yaml':
|
||||
ensure => present,
|
||||
mode => '0640',
|
||||
|
@ -5,6 +5,7 @@ pass=<%= recheck_bot_passwd %>
|
||||
server=irc.freenode.net
|
||||
port=6667
|
||||
channel_config=/etc/elastic-recheck/recheckwatchbot.yaml
|
||||
log_config=/etc/elastic-recheck/logging.config
|
||||
|
||||
[gerrit]
|
||||
user=<%= gerrit_user %>
|
||||
|
Loading…
Reference in New Issue
Block a user