Commit 4fcaf921 authored by Frank Bergmann's avatar Frank Bergmann

Added logging

parent f1a94910
......@@ -297,7 +297,11 @@ ad_proc im_rule_callback {
set error_p [catch {
set fire_p [expr $rule_condition_tcl]
} error_msg]
ns_log Notice "im_rule_callback: fire_p=$fire_p, condition=$rule_condition_tcl"
ns_log Notice "im_rule_callback: fire_p=$fire_p, condition=$rule_condition_tcl, error_p=$error_p, error_msg='$error_msg'"
ns_log Notice "im_rule_callback: new=[array get new]"
ns_log Notice "im_rule_callback: old=[array get old]"
ns_log Notice "im_rule_callback: changed=[array get changed]"
if {$error_p} {
global errorInfo
......@@ -469,15 +473,16 @@ ad_proc im_rule_callback_fire_email {
# Substitute the mail's body
if {[catch {
set cmd "set body \"$rule_action_email_body\""
ns_log Notice "im_rule_callback_fire_email: cmd='$cmd'"
eval $cmd
} err_msg]} {
global errorInfo
ns_log Notice "im_rule_callback_fire_email: Error in rule_action_email_body: object_id=$object_id, rule_id=$rule_id, message='$err_msg', info=$errorInfo, statement=$rule_action_email_body"
im_rule_callback_log -object_id $object_id -rule_id $rule_id -source "action_email_body_error" \
-message "$err_msg - $errorInfo" -statement $rule_action_email_body -env $env
set email_error_p 1
continue
}
ns_log Notice "im_rule_callback_fire_email: Sending email to $email: $subject\n$body"
if {$debug_p} {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment