ad_log (public)

 ad_log level [ args... ]

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Output ns_log message with detailed context. This function is intended to be used typically with "error" to ease debugging. Repeated messages are reported only once, with a reference to the first occurrence.

Parameters:
level (required)
Severity level such as "error" or "warning".
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_folder_with_page create_folder_with_page (test xowf) ad_log ad_log test_create_folder_with_page->ad_log test_create_form_with_form_instance create_form_with_form_instance (test xowiki) test_create_form_with_form_instance->ad_log test_create_workflow_with_instance create_workflow_with_instance (test xowf) test_create_workflow_with_instance->ad_log util::request_info util::request_info (public) ad_log->util::request_info Class ::acs::LockfreeCache Class ::acs::LockfreeCache (public) Class ::acs::LockfreeCache->ad_log Class ::xo::Context Class ::xo::Context (public) Class ::xo::Context->ad_log Class ::xo::db::Class Class ::xo::db::Class (public) Class ::xo::db::Class->ad_log Class ::xo::db::CrClass Class ::xo::db::CrClass (public) Class ::xo::db::CrClass->ad_log Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->ad_log

Testcases:
create_folder_with_page, create_workflow_with_instance, create_form_with_form_instance
Source code:
    set key $level-$args
    if {[nsv_get ad_log $key previous_thread_name]} {
        set cnt [nsv_incr ad_log $key-count]
        ns_log notice ... repeated $level #$cnt (see $previous_thread_name)
    } else {
        nsv_set ad_log $key [ns_thread name]
        set with_headers [expr {$level in {error Error}}]
        append request "    "  [util::request_info -with_headers=$with_headers]

        ns_log $level {*}$args "\n[uplevel ad_get_tcl_call_stack]${request}\n"
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: