Maj
This commit is contained in:
parent
8429572ff9
commit
1328dbced0
@ -1,38 +1,24 @@
|
|||||||
#status = error
|
name=PropertiesConfig
|
||||||
#dest = err
|
property.filename = logs
|
||||||
#name = PropertiesConfig
|
appenders = console, file
|
||||||
#
|
|
||||||
#property.filename = target/rolling/rollingtest.log
|
appender.console.type = Console
|
||||||
#
|
appender.console.name = STDOUT
|
||||||
#filter.threshold.type = ThresholdFilter
|
appender.console.layout.type = PatternLayout
|
||||||
#filter.threshold.level = debug
|
appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
|
||||||
#
|
|
||||||
#appender.console.type = Console
|
appender.file.type = File
|
||||||
#appender.console.name = STDOUT
|
appender.file.name = LOGFILE
|
||||||
#appender.console.layout.type = PatternLayout
|
appender.file.fileName=${filename}/propertieslogs.log
|
||||||
#appender.console.layout.pattern = %m%n
|
appender.file.layout.type=PatternLayout
|
||||||
#appender.console.filter.threshold.type = ThresholdFilter
|
appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
|
||||||
#appender.console.filter.threshold.level = error
|
|
||||||
#
|
loggers=file
|
||||||
#appender.rolling.type = RollingFile
|
logger.file.name = NGCC
|
||||||
#appender.rolling.name = RollingFile
|
logger.file.level = debug
|
||||||
#appender.rolling.fileName = ${filename}
|
logger.file.appenderRefs = file
|
||||||
#appender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz
|
logger.file.appenderRef.file.ref = LOGFILE
|
||||||
#appender.rolling.layout.type = PatternLayout
|
|
||||||
#appender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n
|
rootLogger.level = debug
|
||||||
#appender.rolling.policies.type = Policies
|
rootLogger.appenderRefs = stdout
|
||||||
#appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
|
rootLogger.appenderRef.stdout.ref = STDOUT
|
||||||
#appender.rolling.policies.time.interval = 2
|
|
||||||
#appender.rolling.policies.time.modulate = true
|
|
||||||
#appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
|
|
||||||
#appender.rolling.policies.size.size=100MB
|
|
||||||
#appender.rolling.strategy.type = DefaultRolloverStrategy
|
|
||||||
#appender.rolling.strategy.max = 5
|
|
||||||
#
|
|
||||||
#logger.rolling.name = com.example.my.app
|
|
||||||
#logger.rolling.level = debug
|
|
||||||
#logger.rolling.additivity = false
|
|
||||||
#logger.rolling.appenderRef.rolling.ref = RollingFile
|
|
||||||
#
|
|
||||||
#rootLogger.level = info
|
|
||||||
#rootLogger.appenderRef.stdout.ref = STDOUT
|
|
@ -1,38 +1,24 @@
|
|||||||
#status = error
|
name=PropertiesConfig
|
||||||
#dest = err
|
property.filename = logs
|
||||||
#name = PropertiesConfig
|
appenders = console, file
|
||||||
#
|
|
||||||
#property.filename = target/rolling/rollingtest.log
|
appender.console.type = Console
|
||||||
#
|
appender.console.name = STDOUT
|
||||||
#filter.threshold.type = ThresholdFilter
|
appender.console.layout.type = PatternLayout
|
||||||
#filter.threshold.level = debug
|
appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
|
||||||
#
|
|
||||||
#appender.console.type = Console
|
appender.file.type = File
|
||||||
#appender.console.name = STDOUT
|
appender.file.name = LOGFILE
|
||||||
#appender.console.layout.type = PatternLayout
|
appender.file.fileName=${filename}/propertieslogs.log
|
||||||
#appender.console.layout.pattern = %m%n
|
appender.file.layout.type=PatternLayout
|
||||||
#appender.console.filter.threshold.type = ThresholdFilter
|
appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
|
||||||
#appender.console.filter.threshold.level = error
|
|
||||||
#
|
loggers=file
|
||||||
#appender.rolling.type = RollingFile
|
logger.file.name = NGCC
|
||||||
#appender.rolling.name = RollingFile
|
logger.file.level = debug
|
||||||
#appender.rolling.fileName = ${filename}
|
logger.file.appenderRefs = file
|
||||||
#appender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz
|
logger.file.appenderRef.file.ref = LOGFILE
|
||||||
#appender.rolling.layout.type = PatternLayout
|
|
||||||
#appender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n
|
rootLogger.level = debug
|
||||||
#appender.rolling.policies.type = Policies
|
rootLogger.appenderRefs = stdout
|
||||||
#appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
|
rootLogger.appenderRef.stdout.ref = STDOUT
|
||||||
#appender.rolling.policies.time.interval = 2
|
|
||||||
#appender.rolling.policies.time.modulate = true
|
|
||||||
#appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
|
|
||||||
#appender.rolling.policies.size.size=100MB
|
|
||||||
#appender.rolling.strategy.type = DefaultRolloverStrategy
|
|
||||||
#appender.rolling.strategy.max = 5
|
|
||||||
#
|
|
||||||
#logger.rolling.name = com.example.my.app
|
|
||||||
#logger.rolling.level = debug
|
|
||||||
#logger.rolling.additivity = false
|
|
||||||
#logger.rolling.appenderRef.rolling.ref = RollingFile
|
|
||||||
#
|
|
||||||
#rootLogger.level = info
|
|
||||||
#rootLogger.appenderRef.stdout.ref = STDOUT
|
|
@ -13,11 +13,13 @@ class TestLog4j {
|
|||||||
private static Logger logger = LogManager.getLogger();
|
private static Logger logger = LogManager.getLogger();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
logger.debug("msg de debogage");
|
logger.debug("msg de debogage");
|
||||||
logger.info("msg d'information");
|
logger.info("msg d'information");
|
||||||
logger.warn("msg d'avertissement");
|
logger.warn("msg d'avertissement");
|
||||||
logger.error("msg d'erreur");
|
logger.error("msg d'erreur");
|
||||||
logger.fatal("msg d'erreur fatale");
|
logger.fatal("msg d'erreur fatale");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user