Why use Log::Log4perl instead of any other logging module on CPAN?
That’s a good question. There’s dozens of logging modules on CPAN. When it comes to logging, people typically think: “Aha. Writing out debug and error messages. Debug is lower than error. Easy. I’m gonna write my own.” Writing a logging module is like a rite of passage for every Perl programmer, just like writing your own templating system. Of course, after getting the basics right, features need to be added. You’d like to write a timestamp with every message. Then timestamps with microseconds. Then messages need to be written to both the screen and a log file. And, as your application grows in size you might wonder: Why doesn’t my logging system scale along with it? You would like to switch on logging in selected parts of the application, and not all across the board, because this kills performance. This is when people turn to Log::Log4perl, because it handles all of that. Avoid this costly switch. Use Log::Log4perl right from the start.
That’s a good question. There’s dozens of logging modules on CPAN. When it comes to logging, people typically think: “Aha. Writing out debug and error messages. Debug is lower than error. Easy. I’m gonna write my own.” Writing a logging module is like a rite of passage for every Perl programmer, just like writing your own templating system. Of course, after getting the basics right, features need to be added. You’d like to write a timestamp with every message. Then timestamps with microseconds. Then messages need to be written to both the screen and a log file. And, as your application grows in size you might wonder: Why doesn’t my logging system scale along with it? You would like to switch on logging in selected parts of the application, and not all across the board, because this kills performance. This is when people turn to Log::Log4perl, because it handles all of that. Avoid this costly switch. Use Log::Log4perl right from the start.