Link to home
Create AccountLog in
Avatar of bhomass
bhomass

asked on

define path variable in logback.xml

I want to set the file appender to ${CATALINA_HOME}\logs\mylog.log

where do I specify the value for CATALINA_HOME? it is already defined as system variable, but it is not recognized by slf4j
Avatar of Corey Habbas
Corey Habbas
Flag of United States of America image

Hi,

I am assuming you are tyring to get the variable for computer name and access the system variables.
You can use java.net.InetAddress class for getting the computer name.

String myComputerName = InetAddress.getLocalHost().getHostName();

Open in new window


I hope this helps...
Avatar of bhomass
bhomass

ASKER

you provided java. I am looking for a fix in logback.xml
ASKER CERTIFIED SOLUTION
Avatar of Corey Habbas
Corey Habbas
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of bhomass

ASKER

thanks, is more than clear