Subject: | Unnecessary calls to Term::ANSIColor (and corresponding undefined error) |
When logging at the debugging level, I was seeing these sorts of errors:
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl/5.14/Term/ANSIColor.pm line 244, <STDIN> line 1.
postgresql service stopping
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl/5.14/Term/ANSIColor.pm line 244, <STDIN> line 1.
Looking at the code, it would seem to be because of the lack of a color
value for that logging level.
It seems to me that the most sensible thing to do (which is also what the
Log4perl adapter does), is not hit Term::ANSIColor at all if there's
nothing to do. I have attached a patch that does this. So it should be
both a little faster and a little more correct. ;)
Subject: | undefined |
Message body not shown because it is not plain text.