Permalink
Browse files

Simplify the log string even more.

  • Loading branch information...
lehenbauer committed Dec 15, 2010
1 parent 73e3efb commit 05e593ab3d5c369d4fa49594c9e5f7a5ac355108
Showing with 4 additions and 6 deletions.
  1. +4 −6 smartsockets/dropper.tcl
View
@@ -23,17 +23,15 @@ proc syslog {_message} {
return ""
}
+ set string "$message(clock) / [string trim $message(timestamp)] / $message(host) / $message(program) / $message(priority) / $message(facility)"
+ unset message(clock) message(timestamp) message(host) message(program) message(priority) message(facility)
+
set string ""
- foreach key "clock timestamp host program priority facility" {
- if {![info exists message($key)]} continue
- append string ", $key: $message($key)"
- unset message($key)
- }
foreach key [lsort [array names message]] {
append string ", $key: $message($key)"
}
- puts "log [string range $string 2 end]"
+ puts "l $string"
}
#

0 comments on commit 05e593a

Please sign in to comment.