comparison contrib/assimilate_alien_loggers.rb @ 7730:e1b831fe435a slt-simplify-cross-sections

Merged default into slt-simplify-cross-sections branch and updated package and class names.
author Tom Gottfried <tom@intevation.de>
date Mon, 20 Jan 2014 14:04:20 +0100
parents 8dd89da79eaa
children
comparison
equal deleted inserted replaced
5084:ca45dd039b54 7730:e1b831fe435a
1 # run like ruby -i -p assimilate_alien_loggers.rb FILES(or stdin)
2 # This will replace in-place and will result in wrong getLogger
3 # statements in certain inner-class scenarios! Be careful.
4
5 $last_class
6 if $_ =~ /class ([a-zA-Z0-9]+)/
7 $last_class = "#{$1}.class"
8 end
9 if $_ =~ /getLogger/
10 gsub(/getLogger[ ]*\(.*\)/, "getLogger(#{$last_class})")
11 end

http://dive4elements.wald.intevation.org