Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I replace a 'serverName' parameter in a log. xml file of a .war application with the Ibm websphere server name on deployment time (by command ile on linux env). I mean what is the syntax for it in the log.xml file and in the command line. Can I do this also with the wasadmin app ?

share|improve this question

As far as I am aware, you don't - depending on which commons-logging method you're using it's different, but in general the external Log4j/JSR configs only dictate the logging levels, patterns and filenames (as well as the base factory used, etc.). You need to actually edit your Java code to pull that out (getProperty) and insert it into the log.INFO() (sic) calls when writing. To my knowledge there's no way to do it at the configuration (XML) level.

share|improve this answer
In my log.xml file I point to the log file (full path). The directory name where the file locate should be the server name . I need it as a parameter – yoav Jan 2 '11 at 19:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.