[logback-user] Sending log files to user's home directory

Chris Pratt thechrispratt at gmail.com
Thu May 16 20:58:08 CEST 2013


You might try using the predefined system properties, like:

${user.home}

see http://logback.qos.ch/manual/configuration.html#variableSubstitutionfor
more information.
  (*Chris*)



On Thu, May 16, 2013 at 10:23 AM, Tony Trinh <tony19 at gmail.com> wrote:

> 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
>>
>
>
> _______________________________________________
> 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/fcfbdf21/attachment.html>


More information about the Logback-user mailing list