[Nitro] Patch: glue-0.23.0/logger to work with Cygwin Ruby 1.8.3
Aleksi Niemela
Aleksi.Niemela at cs.helsinki.fi
Sun Oct 9 11:47:31 EDT 2005
When I updated my cygwin environment I got Ruby 1.8.3. I suspect I also
got new version of standard library logger.rb. Glue's logger.rb didn't
want to co-operate with it as it seems it might have altered the order
of the parameters. I got glue (and og and nitro) to give out debugging
messages just ok when I made these changes.
I don't know if this patch is a duplicate, but I couldn't find anything
on the list of this matter within few minutes. I did find Georges reply
to James sent 2005-09-11 about some fix for Logging. Can't say if that
thread ever got decent end.
- Aleksi
$ diff -u logger.rb~ logger.rb
--- logger.rb~ 2005-08-31 19:49:58.539000000 +0300
+++ logger.rb 2005-10-09 18:40:32.781250000 +0300
@@ -105,7 +105,7 @@
SIMPLE_FORMAT = "%5s: %s\n"
@@global_logger = Logger.new(STDERR)
- @@global_logger.setup_format do |severity, timestamp, msg, progname|
+ @@global_logger.setup_format do |severity, timestamp, progname, msg|
SIMPLE_FORMAT % [severity, msg]
end
@@ -114,12 +114,12 @@
def self.set(logger)
if logger.is_a?(String)
@@global_logger = Logger.new(logger)
- @@global_logger.setup_format do |severity, timestamp, msg, progname|
+ @@global_logger.setup_format do |severity, timestamp, progname, msg|
SIMPLE_FORMAT % [severity, msg]
end
elsif logger.is_a?(Logger)
@@global_logger = logger
- @@global_logger.setup_format do |severity, timestamp, msg, progname|
+ @@global_logger.setup_format do |severity, timestamp, progname, msg|
SIMPLE_FORMAT % [severity, msg]
end
else
More information about the Nitro-general
mailing list