cims_logger.tcl 652 B

1234567891011121314151617
  1. # define your own logging.. lets called by mnet:history_queue! You can change the call in mnet.tcl
  2. # And you can change the things it does with the data here.. Logging is optional
  3. # and is most likely only done at a central netbot
  4. putlog "mnet: = Procedure ::cims::history_logger loaded"
  5. proc ::cims::history_logger {bucket nickname channel rec_text} {
  6. # write all to it
  7. set timestamp [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"]
  8. set input_history "$timestamp / $nickname - $channel : $rec_text"
  9. #open handle
  10. set fh [open "scripts/cims/${bucket}.log" "a"]
  11. # put to handle
  12. puts $fh "$input_history"
  13. # close handle
  14. close $fh
  15. }