felix@7539: # run like ruby -i -p assimilate_alien_loggers.rb FILES(or stdin) felix@7539: # This will replace in-place and will result in wrong getLogger felix@7539: # statements in certain inner-class scenarios! Be careful. felix@7539: felix@7539: $last_class felix@7539: if $_ =~ /class ([a-zA-Z0-9]+)/ felix@7539: $last_class = "#{$1}.class" felix@7539: end felix@7539: if $_ =~ /getLogger/ felix@7539: gsub(/getLogger[ ]*\(.*\)/, "getLogger(#{$last_class})") felix@7539: end