commit 3df123431fb00b4db417a7b3576e8cdf5aa1583d
parent 78411f022f7e7fd9756ad83dd68d27d2d4d0350f
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date: Tue, 12 Sep 2006 18:31:29 -0700
[project @ 606c80b2a95c6fde390037319dc2ae224f023ec2]
[project @ 77]
up log msgs
Diffstat:
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/wm.rb b/wm.rb
@@ -80,13 +80,12 @@ module Wmii
areas.each do |a|
if a.indices.detect {|i| i == aClientId}
- puts "found client #{a[aClientId].inspect}"
return a[aClientId]
end
end
end
- puts "could not find #{aClientId} in area #{aArea.inspect} or view #{aView.inspect}"
+ puts "could not find client #{aClientId} in area #{aArea.inspect} or view #{aView.inspect}" if $DEBUG
nil
end
diff --git a/wmiirc-config.rb b/wmiirc-config.rb
@@ -20,11 +20,13 @@
$: << File.dirname(__FILE__)
require 'rc'
+FS = Wmii.fs
+
## WM startup
-FS = Wmii.fs
-FS.event = "Start wmiirc\n" # terminate existing wmiirc processes
+LOG.info "instance #{$$} starting up"
+FS.event = "Start #{__FILE__}\n"
## executable programs
@@ -402,8 +404,8 @@ begin
case type
when 'Start'
- if arg == 'wmiirc'
- LOG.info 'exiting because another instance has started'
+ if arg == __FILE__
+ LOG.info "instance #{$$} exiting because another is starting"
exit
end
@@ -439,6 +441,6 @@ begin
end
end
rescue EOFError
- LOG.info 'wmii has been terminated'
+ LOG.warn "instance #{$$} exiting because wmii has been terminated"
exit 1
end