[logback-user] Sending log files to user's home directory
Tony Trinh
tony19 at gmail.com
Thu May 16 19:23:28 CEST 2013
Try environment variables [1]:
*Linux:*
${HOME}/logs
*Windows:*
${USERPROFILE}/logs (C:\Users\Tony\logs)
${APPDATA}/logs (C:\Users\Tony\AppData\Roaming)
*Linux or Windows:*
${HOME:-${USERPROFILE}}/logs
tries $HOME first; if it doesn't exist, it tries $USERPROFILE
[1] http://logback.qos.ch/manual/configuration.html#nestedSubst
On Thu, May 16, 2013 at 12:08 PM, Donald McLean <dmclean62 at gmail.com> wrote:
> I'm using a TimeBasedRollingPolicy for an app that may be run under
> different user names and I need the files to go to a "logs" directory in
> the running user's home directory "~/logs". Using "~/logs/" doesn't work in
> the <fileNamePattern>, but is there anything that will work?
>
> Thank you,
>
> Donald
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130516/1206e37d/attachment.html>
More information about the Logback-user
mailing list