[logback-user] How to save logs in home directory of application

Mejmoo mejmoo at gmail.com
Tue Jan 20 11:46:03 CET 2015


Hi,

I need very simple thing. I need to put any logs from file appender to the
file in application directory, where jar is located. (this is Java desktop
application). If I define it explicitly it works:

<file>C:\logname.log</file>

but this does not work

<file>logname.log</file>

I know I can pass some variable to java interpreter and use it as
${LOGHOME} and then use it like

<file>${LOGHOME}/logname.log</file>

but it is really needed? Thanks, Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20150120/ed25abd2/attachment.html>


More information about the Logback-user mailing list