Posted to tcl by Bradipo at Thu Sep 27 17:23:22 GMT 2018view pretty

 We are running as a service
        if {[catch {
            twapi::run_as_service [list [list $service_name ::service_control_handler]]
        } msg]} {
            twapi::eventlog_log "Service error: $msg"
        }

Comments

Posted by sebres at Thu Sep 27 17:53:13 GMT 2018 [text] [code]

may be something like: rename ::exit ::__exit; proc exit args { proc twapi::eventlog_log msg { #define own logging after exit... #set f [open my-log-file.log w]; puts $f $msg; close $f } ::__exit {*}$args }