Hi Helen, To my knowledge it's not possible. There is xdmp:save, but that will replace the file, not append to it.
Have you considered using trace() and using grep-like tools to filter ErrorLog.txt? The advantage op trace() is that you can easily switch outputting of certain trace messages on and off from the MarkLogic Server Admin Pages. Kind regards, Geert > drs. G.P.H. (Geert) Josten Consultant Daidalos BV Hoekeindsehof 1-4 2665 JZ Bleiswijk T +31 (0)10 850 1200 F +31 (0)10 850 1199 mailto:[email protected] http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit e-mailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > From: [email protected] > [mailto:[email protected]] On Behalf Of > helen chen > Sent: vrijdag 5 november 2010 16:34 > To: General Mark Logic Developer Discussion > Subject: Re: [MarkLogic Dev General] question about logging > > Maybe I didn't say it clearly. > > fn:concat() is for the message part. I also want to write > this message to a separate file on the file system, the file > name is specified dynamically. And if this file already > exists on file system, it should be the append , not > overwrite. It is similar to the unix script that I write my > log to some file I want. > > In the meantime I don't want to stop the xdmp:log(), if I use > xdmp:log, it should still write to ErrorLog.txt file. > > Thanks, Helen > > > > On Nov 5, 2010, at 11:19 AM, Tim Meagher wrote: > > > I just embed fn:concat() within the call the xdmp:log() and > > concatenation the various message parts, e.g. > > > > xdmp:log(concat("Path: ", {$path})) > > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of helen > > chen > > Sent: Friday, November 05, 2010 11:16 AM > > To: General Mark Logic Developer Discussion > > Subject: [MarkLogic Dev General] question about logging > > > > Hello there, > > > > In Marklogic, I use xdmp:log() to log message to > ErrorLog.txt file. > > I want to do some logging similar to script, like I specify > the path > > and file name, then I write just the message I want to this > file and > > then keep appending message to this file. I expect that > this should > > not stop the normal logging of xdmp:log(). > > > > Does anyone have suggestion on how to do it? > > > > Thanks, Helen > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > > > _______________________________________________ > > General mailing list > > [email protected] > > http://developer.marklogic.com/mailman/listinfo/general > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
