Discussion:
[Exist-open] output file for util:log
L'omobob
2017-06-01 21:43:13 UTC
Permalink
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 !
Peter Stadler
2017-06-02 09:12:37 UTC
Permalink
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
Post by L'omobob
Hi all,
let $log := util:log("INFO", "helloworld")
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
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
L'omobob
2017-06-02 09:32:12 UTC
Permalink
Thanks !
Post by 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
Post by L'omobob
Hi all,
let $log := util:log("INFO", "helloworld")
2017-06-01 23:40:08,827 [qtp1609754699-43] INFO (LogFunction.java
[writeLog]:199) - (Line: 1 String) helloworld
Post by L'omobob
Is there a way to configure the output as we want ? for example, use a
custom file (foo.log) ?
Post by L'omobob
Can we imagine having multiple files with some params ?
Thanks !
------------------------------------------------------------
------------------
Post by L'omobob
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot______
_________________________________________
Post by L'omobob
Exist-open mailing list
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
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...