Currently there is no way for a logproc to discover its
servicename.
Example:
set log [logger::init foo]
proc customized {txt} {
puts "How shall i find my servicename with this
signature?: $txt"
}
${log}::logproc error customized
There is a workaround using the older logproc syntax
though.
set log [logger::init bar]
proc customized {service txt} {
puts "Logging service $service : $txt"
}
${log}::logproc error txt {
variable service
::customized $service $txt
}
The signature of the custom logproc should be enhanced
with the loglevel, the service and the text and
possible an args for future extensions.
Michael