Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.