Saturday, 13 September 2014

Define Variables in Log4j

we Have WebSphere running multiple JVM servers; each JVM has their log file system directory for log4j logging we can configure path as follows.


Define variables in log4j.properties as below.

1)
log4j.appender.logFileAudit.File=/var/logs/${server.name}/application.log


2)
Set the variable server.name in the JVM arguments. For WebSphere update server.xml

<jvmEntries debugArgs="-Dcom.ibm.ws.classloader.j9enabled=true -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" debugMode="false" disableJIT="false" genericJvmArguments="-Xquickstart -Dserver.name=server1"…

to configure above go to 


Application servers > server1 > Process definition > Java Virtual Machine

add Generic JVM arguments with value .....        

-Dserver.name=server1

No comments:

Post a Comment

Dump Event "systhrow" (00040000) Detail "java/lang/OutOfMemoryError" "Failed to create a thread: retVal -1073741830, errno 11" received

1. Output of the following commands (non root): ulimit -u ulimit -a df -k 2. From any of the JVM that is running, please get it's...