Tag archives for Log4j

Protected: Java : log4j : Documentum + some articles on log4shell topic
There is no excerpt because this is a protected post.
Documentum : Diagnostic DFC configuration, localization log4j.propeties,
Hello, CLIENT SIDE Everybody has already been confronted with problem of localization of or files used on runtime. The DFC configuration files like and are located through the classpath found in WAR files and EAR files. More, for information, there are several possibilities to point to file: Include Statement A can contain an include statement pointing at the ...more»
Java : Log4j overwite the file path on runtime
Hi, After my previous posts concerning Java: Log4j Concepts and Explanations and Java: Log4j in practice, I would expose a solution to overwrite the file path on runtime. Libraries needed : commons-lang3-3.1.jar, commons-logging-1.1.1.jar and log4j-1.2.15.jar. BUSINESS_LOG_FILE=D\:\\...\\... \\data\\results\\InjectorBusiness.log TECHNICAL_LOG_FILE=D\:\\...\\...\\data\\results\\InjectorTechnical.log log4j.rootCategory=ALL,CONSOLE,TECHNICALLOGFILE,BUSINESSLOGFILE #------------------- CONSOLE -------------------------- log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern= %m%n log4j.appender.CONSOLE.Threshold=INFO #------------------- FILE -------------------------- log4j.appender.TECHNICALLOGFILE=org.apache.log4j.RollingFileAppender log4j.appender.TECHNICALLOGFILE.File=injectortech.log log4j.appender.TECHNICALLOGFILE.MaxFileSize=30MB log4j.appender.TECHNICALLOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.TECHNICALLOGFILE.layout.ConversionPattern=%d{ABSOLUTE} %5p %c - %m%n log4j.appender.TECHNICALLOGFILE.Threshold=ALL #------------------- BUSINESSLOGFILE -------------------------- log4j.appender.BUSINESSLOGFILE=org.apache.log4j.DailyRollingFileAppender #log4j.appender.BUSINESSLOGFILE.File=${catalina.base}/logs/Injector.log log4j.appender.BUSINESSLOGFILE.File=injector.log log4j.appender.BUSINESSLOGFILE.DatePattern='.'yyy-MM-dd-HH log4j.appender.BUSINESSLOGFILE.MaxFileSize=30MB log4j.appender.BUSINESSLOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.BUSINESSLOGFILE.Threshold=ALL log4j.appender.BUSINESSLOGFILE.Append=true log4j.appender.BUSINESSLOGFILE.layout.ConversionPattern=%-d{MMM dd HH:mm:ss} %-5p %c %M %m%n Execute the MainApp class with the following program ...more»
Java: Log4j in practice
Hi, After my post Java: Log4j Concepts and Explanations about Log4j concepts, I would introduce Log4j in practice through several concrets examples and their results. The section of this article will be: 1) Use of Log4j directly 2) Specifying granularity for external library or for custom package 3) Use of Log4j with a wrapper 4) Extended example with DailyRollingFileAppender 5) Use of environment variables in Log4J 6) Configure ...more»
Copyright ® 2012 Hüseyin Özveren. No reproduction, even partial, can be used from this site and all its contents including text, documents, images, etc.. without the express permission of the author.