Loading TOC...

MarkLogic Server 11.0 Product Documentation
infodev:log-progress

infodev:log-progress(
   $ticket-id as xs:string,
   $annotation as element(info:annotation),
   [$documents-processed as xs:nonNegativeInteger?],
   [$transactions-completed as xs:nonNegativeInteger?],
   [$error-log-level as xs:string?]
) as empty-sequence()

Summary

[DEPRECATED] This function writes log information into a ticket's progress file that is written to the App-Services database.

Parameters
ticket-id The id of the ticket.
annotation The string to place in the annotation element.
documents-processed The value to place in the documents-processed element.
transactions-completed The value to place in the transactions-completed element.
error-log-level The error log level. The possible levels are emergency, alert, critcal, error, warning, notice, info, config, debug, fine, finer, or finest. The default level is info.

Example

  xquery version "1.0-ml"; 

  import module namespace info = "http://marklogic.com/appservices/infostudio"  
      at "/MarkLogic/appservices/infostudio/info.xqy"; 
  import module namespace infodev = "http://marklogic.com/appservices/infostudio/dev"
      at "/MarkLogic/appservices/infostudio/infodev.xqy";

  let $annotation := <info:annotation>Load took longer than 10 minutes</info:annotation>

  for $ticket in info:tickets()
    let $time := fn:data(info:ticket($ticket)//info:time-consumed)
    return 
      if (fn:minutes-from-duration(xs:duration($time)) gt 10)
      then infodev:log-progress($ticket, $annotation)
      else ()

  (: Change progress annotation on any ticket with a time-consumed value 
     over 10 minutes. :)
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.