java - Getting all logs of different class in one file -


i trying logs of different class in 1 file. using log4j2 , properties file configuration.my configuration file below. here test class , impl class implementation class contains code.please help.

problem is not showing logs test class.it showing logs impl class.

name=propertiesconfig property.filename = logs appenders = console, file  appender.console.type = console appender.console.name = stdout appender.console.layout.type = patternlayout appender.console.layout.pattern = [%-5level] %d{yyyy-mm-dd hh:mm:ss.sss} [%t] %c{1} - %msg%n  appender.file.type = file appender.file.name = logfile appender.file.filename=${filename}/propertieslogs.log appender.file.layout.type=patternlayout appender.file.layout.pattern=[%-5level] %d{yyyy-mm-dd hh:mm:ss.sss}[%t]%c{1}-%msg%n  loggers=file logger.file.name=com.package.metadata.test logger.file.name=com.package.metadataservice.impl logger.file.level = debug logger.file.appenderrefs = file logger.file.appenderref.file.ref = logfile  rootlogger.level = debug rootlogger.appenderrefs = stdout rootlogger.appenderref.stdout.ref = stdout 

name=propertiesconfig property.filename = logs appenders = console, file  appender.console.type = console appender.console.name = stdout appender.console.layout.type = patternlayout appender.console.layout.pattern = [%-5level] %d{yyyy-mm-dd hh:mm:ss.sss} [%t] %c{1} - %msg%n  appender.file.type = file appender.file.name = logfile appender.file.filename=${filename}/propertieslogs.log appender.file.layout.type=patternlayout appender.file.append=true appender.file.layout.pattern=[%-5level] %d{yyyy-mm-dd hh:mm:ss.sss} [%t] %c{1} - %msg%n loggers=file1,file2,file3,file4 logger.file1.name=test logger.file1.level = debug logger.file1.appenderrefs = file logger.file1.appenderref.file.ref = logfile  logger.file2.name=metadataservice.impl logger.file2.level = debug logger.file2.appenderrefs = file logger.file2.appenderref.file.ref = logfile  logger.file3.name=db.connector logger.file3.level = debug logger.file3.appenderrefs = file logger.file3.appenderref.file.ref = logfile      logger.file4.name=metadatareader     logger.file4.level = debug     logger.file4.appenderrefs = file     logger.file4.appenderref.file.ref = logfile  rootlogger.level = debug rootlogger.appenderrefs = stdout rootlogger.appenderref.stdout.ref = stdout 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -