0

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 ?

yoav
  • 1

1 Answers1

0

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.

  • 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 02 '11 at 19:10