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

  1. We are running as a service
  2. if {[catch {
  3. twapi::run_as_service [list [list $service_name ::service_control_handler]]
  4. } msg]} {
  5. twapi::eventlog_log "Service error: $msg"
  6. }

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 }