Link to home
Start Free TrialLog in
Avatar of booksplus
booksplus

asked on

The wl.logdir variable

What is the wl.logdir variable and where does it normally get set.  For example, it can be used in a log4j xml config file, but where does it
get set?

Example of how it gets used
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

  <appender name="file" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="${wl.logdir}/apps/app.${weblogic.Name}.log"/>
...

But where does it get set.
Avatar of petmagdy
petmagdy
Flag of Canada image

which version of weblogic r u talking about?
Avatar of booksplus
booksplus

ASKER

Version 6.1
ASKER CERTIFIED SOLUTION
Avatar of petmagdy
petmagdy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"Also u can't use this file in Lo4J because the file will be logged by Weblogic Process and it is rotational"   -- not sure
what you mean here.  This variable is actually being used in our log4j.xml, but it's not clear to me where the variable gets set.  If
I understand you, it gets set in the config.xml file??
sorry correction I understood the question wrongly, please try this:

1- search for the apps directory inside bea home directory and if found like that for example "c:\bea\weblogic61\domain\myserver\apps" then do step 2

2- modify the configuration like this:
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

      <property name="wl.logdir" value="c:\bea\weblogic61\domain\myserver" />
  <appender name="file" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="${wl.logdir}/apps/app.${weblogic.Name}.log"/>


I think we are missing eachother's meanings --  

wl.logdir gets used inside the  log4j.xml file

"<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
  <appender name="file" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="${wl.logdir}/apps/app.${weblogic.Name}.log"/>

..."

wl.logdir needs to be set somewhere so that it works for all apps on a server.  What file
does it get set in (config.xml?? or some other file)??
Increasing points on this (adding 100 points)