Skip to content

Commit

Permalink
Simplify the log string even more.
Browse files Browse the repository at this point in the history
  • Loading branch information
lehenbauer committed Dec 15, 2010
1 parent 73e3efb commit 05e593a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions smartsockets/dropper.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

#
Expand Down

0 comments on commit 05e593a

Please sign in to comment.