output file for util:log

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

output file for util:log

L'omobob
Hi all,

Quick question, when I call an xquery file with this line:

let $log := util:log("INFO", "helloworld")

I get this line in webapp/web-inf/log/exist.log:

2017-06-01 23:40:08,827 [qtp1609754699-43] INFO  (LogFunction.java [writeLog]:199) - (Line: 1 String) helloworld

Is there a way to configure the output as we want ? for example, use a custom file (foo.log) ?

Can we imagine having multiple files with some params ?

Thanks !



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: output file for util:log

Peter Stadler
Hi,

util:log-app($priority as xs:string, $logger-name as xs:string, $message as item()*) as item()
allows you to specify a logger which you can define (and it’s output file) in the appropriate log4j2.xml configuration (see http://exist-db.org/exist/apps/doc/devguide_log4j.xml).

Best
Peter

> Am 01.06.2017 um 23:43 schrieb L'omobob <[hidden email]>:
>
> Hi all,
>
> Quick question, when I call an xquery file with this line:
>
> let $log := util:log("INFO", "helloworld")
>
> I get this line in webapp/web-inf/log/exist.log:
>
> 2017-06-01 23:40:08,827 [qtp1609754699-43] INFO  (LogFunction.java [writeLog]:199) - (Line: 1 String) helloworld
>
> Is there a way to configure the output as we want ? for example, use a custom file (foo.log) ?
>
> Can we imagine having multiple files with some params ?
>
> Thanks !
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. +49 5231 975-676
Fax: +49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: output file for util:log

L'omobob
Thanks ! 

Le 2 juin 2017 11:16 AM, "Peter Stadler" <[hidden email]> a écrit :
Hi,

util:log-app($priority as xs:string, $logger-name as xs:string, $message as item()*) as item()
allows you to specify a logger which you can define (and it’s output file) in the appropriate log4j2.xml configuration (see http://exist-db.org/exist/apps/doc/devguide_log4j.xml).

Best
Peter

> Am 01.06.2017 um 23:43 schrieb L'omobob <[hidden email]>:
>
> Hi all,
>
> Quick question, when I call an xquery file with this line:
>
> let $log := util:log("INFO", "helloworld")
>
> I get this line in webapp/web-inf/log/exist.log:
>
> 2017-06-01 23:40:08,827 [qtp1609754699-43] INFO  (LogFunction.java [writeLog]:199) - (Line: 1 String) helloworld
>
> Is there a way to configure the output as we want ? for example, use a custom file (foo.log) ?
>
> Can we imagine having multiple files with some params ?
>
> Thanks !
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open

--
Peter Stadler
Carl-Maria-von-Weber-Gesamtausgabe
Arbeitsstelle Detmold
Hornsche Str. 39
D-32756 Detmold
Tel. <a href="tel:%2B49%205231%20975-676" value="+495231975676">+49 5231 975-676
Fax: <a href="tel:%2B49%205231%20975-668" value="+495231975668">+49 5231 975-668
stadler at weber-gesamtausgabe.de
www.weber-gesamtausgabe.de


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open