view contrib/assimilate_alien_loggers.rb @ 8600:d23982357c79

(issue1753) Fix editing the point color (not Color) of SQThemes. Theme handling was already done case insensitive for some things but not for all. This is better as it makes the theme documents more robust and there is no ambiguity in the supported keywords.
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 20 Mar 2015 15:04:25 +0100
parents 8dd89da79eaa
children
line wrap: on
line source
# run like ruby -i -p assimilate_alien_loggers.rb FILES(or stdin)
# This will replace in-place and will result in wrong getLogger
# statements in certain inner-class scenarios! Be careful.

$last_class
if $_ =~ /class ([a-zA-Z0-9]+)/
  $last_class = "#{$1}.class"
end
if $_ =~ /getLogger/
  gsub(/getLogger[ ]*\(.*\)/, "getLogger(#{$last_class})")
end

http://dive4elements.wald.intevation.org