Added logging to mon-persister-config.yml.
This commit is contained in:
parent
71ed224c83
commit
51b42c591b
@ -16,7 +16,6 @@ public class MonPersisterService extends Service<MonPersisterConfiguration> {
|
||||
|
||||
@Override
|
||||
public void run(MonPersisterConfiguration configuration, Environment environment) throws Exception {
|
||||
System.out.println("Hello, my name is " + configuration.getName());
|
||||
environment.addResource(new Resource());
|
||||
environment.addHealthCheck(new SimpleHealthCheck("foo"));
|
||||
}
|
||||
|
@ -1 +1,89 @@
|
||||
name: mon-persister
|
||||
name: mon-persister
|
||||
|
||||
# Logging settings.
|
||||
logging:
|
||||
|
||||
# The default level of all loggers. Can be OFF, ERROR, WARN, INFO,
|
||||
# DEBUG, TRACE, or ALL.
|
||||
level: INFO
|
||||
|
||||
# Logger-specific levels.
|
||||
loggers:
|
||||
|
||||
# Sets the level for 'com.example.app' to DEBUG.
|
||||
com.example.app: DEBUG
|
||||
|
||||
# Settings for logging to stdout.
|
||||
console:
|
||||
|
||||
# If true, write log statements to stdout.
|
||||
enabled: true
|
||||
|
||||
# Do not display log statements below this threshold to stdout.
|
||||
threshold: ALL
|
||||
|
||||
# The time zone in which dates should be displayed.
|
||||
timeZone: UTC
|
||||
|
||||
# A custom Logback format string.
|
||||
logFormat: null
|
||||
|
||||
# Settings for logging to a file.
|
||||
file:
|
||||
|
||||
# If true, write log statements to a file.
|
||||
enabled: true
|
||||
|
||||
# Do not write log statements below this threshold to the file.
|
||||
threshold: ALL
|
||||
|
||||
# The time zone in which dates should be displayed.
|
||||
timeZone: UTC
|
||||
|
||||
# A custom Logback format string.
|
||||
logFormat: null
|
||||
|
||||
# The file to which statements will be logged.
|
||||
#
|
||||
# If enabled is true, this must be specified.
|
||||
currentLogFilename: ./logs/mon-persister.log
|
||||
|
||||
# If true, log files are rotated and archived.
|
||||
archive: true
|
||||
|
||||
# When the log file rolls over, the file will be archived to
|
||||
# app-2012-03-15.log.gz, example.log will be truncated,
|
||||
# and new statements written to it.
|
||||
#
|
||||
# If archive is true, this must be specified.
|
||||
archivedLogFilenamePattern: ./logs/mon-persister-%d.log.gz
|
||||
|
||||
# The maximum number of log files to archive.
|
||||
archivedFileCount: 5
|
||||
|
||||
# Settings for logging to syslog.
|
||||
syslog:
|
||||
|
||||
# If true, write log statements to syslog.
|
||||
enabled: false
|
||||
|
||||
# The hostname of the syslog server to which statements will be
|
||||
# sent.
|
||||
#
|
||||
# N.B.: If this is the local host, the local syslog instance
|
||||
# will need to be configured to listen on an inet socket, not just
|
||||
# a Unix socket.
|
||||
host: localhost
|
||||
|
||||
# The syslog facility to which statements will be sent.
|
||||
#
|
||||
# Can be one of: {AUTH, AUTHPRIV, DAEMON, CRON, FTP, LPR, KERN,
|
||||
# MAIL, NEWS, SYSLOG, USER, UUCP, LOCAL0, LOCAL1, LOCAL2, LOCAL3,
|
||||
# LOCAL4, LOCAL5, LOCAL6, LOCAL7}.
|
||||
facility: local0
|
||||
|
||||
# The time zone in which dates should be displayed.
|
||||
timeZone: UTC
|
||||
|
||||
# A custom Logback format string.
|
||||
logFormat: null
|
@ -1,4 +1,4 @@
|
||||
log4j.rootLogger=debug, stdout, R
|
||||
log4j.rootLogger=info, stdout, R
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
@ -7,7 +7,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
|
||||
|
||||
log4j.appender.R=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.R.File=kafaTest.log
|
||||
log4j.appender.R.File=mon-persister.log
|
||||
|
||||
log4j.appender.R.MaxFileSize=100KB
|
||||
# Keep one backup file
|
||||
|
Loading…
Reference in New Issue
Block a user