Hi Abhishek,

While the server does conceptually have to check the settings for the log level 
and trace events, it is able to do this very efficiently, so I would not worry 
about that from a performance standpoint; MarkLogic keeps a view of the 
configuration in memory and can access that information very quickly.

Now if you are logging millions of entries, that can take some resources, as it 
does have to be written to the ErrorLog.txt file, but again, I think you would 
have to be logging a lot of messages to make an appreciable difference in a 
query.

As far as a performance comparison, as with all things, I'd recommend you 
profile it.  I would expect them to be about the same, and for their cost to be 
very small (again, unless you call them a lot of times).

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Abhishek53 S
Sent: Wednesday, June 29, 2011 2:41 AM
To: General MarkLogic Developer Discussion
Cc: [email protected]
Subject: [MarkLogic Dev General] xdmp:trace and xdmp:log


Hi Folks

Now this question is more theoretical. xdmap:trace and xdmp:log both are used 
to log information into ErrorText.txt file. The point of confusion is related 
to the mechanism both API uses for logging. Say if I use multiple time xdmp:log 
and xdmp:trace in the query , For every time logging API is used in the same 
query Do i check for the server settings for the corresponding logging API.

Trying to explain through example

Query: 
xdmp:log(<some-info>)....xdmp:log(<some-info>).....xdmp:log(<some-info>)....xdmp:log(<some-info>)..xdmp:trace(<some-info>)
(Query is using multiple times logging throug xdmp:log & xdmp:trace)


For each time xdmp:log do it verify server settings for level (info,debug...)
For each time xdmp:trace do it verify server settings for event ID (event id is 
active/present)

What about performance comparison between both the APIs?

Thanks in advance !
Abhishek Srivastav
Systems Engineer
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com<http://www.tcs.com/>
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________

=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to