nsmcp::LogTool method execute (public)
<instance of nsmcp::LogTool> execute context arguments
Defined in /usr/local/ns/tcl/nsmcp/log-tools.tcl
Dispatch a validated log-diagnostic tool request. Select the configured operation and route it through the owned job service or cached result interface.
- Parameters:
- context (required)
- Authenticated request context carrying the principal, grants and selected server.
- arguments (required)
- Rooted ns_json typed triples for the tool's JSON argument object.
- Returns:
- A rooted JSON tool-result object, including availability or job metadata as appropriate.
- Testcases:
- No testcase defined.
Source code: set values [:arguments $arguments] switch ${:operation} { errors { return [${:service} start $context errors [dict merge {severity Error literal {} limit 100} $values]] } requestContext { if {[dict exists $values identifier]} { return [${:service} start $context requestContext [dict get $values identifier]] } set ids {} foreach {i t id} [dict get $values identifiers] { lappend ids $id } return [${:service} start $context requestContexts [dict create identifiers $ids limit [:dict getdef $values limit 100]]] } results { if {[dict exists $values jobHandle]} { return [${:service} poll $context [dict get $values jobHandle]] } set values [dict merge {cursor 0 limit 20 includePeerAddresses false} $values] return [${:service} results $context [dict get $values resultHandle] [dict get $values cursor] [dict get $values limit] [dict get $values includePeerAddresses]] } }XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)