I’m searching for a logging framework for Ruby. Are there any advantages of log4r over the standard Logger class?
I’m searching for a logging framework for Ruby. Are there any advantages of log4r
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One of the big advantages of the log4r package is that it follows the pattern of the log4j, log4cpp, log4net, etc packages that many people are already familiar with. It also has support for configuration files, allowing logging to be configured easily at runtime without modifying the code. A disadvantage is that it is not an exact clone of the log4j family of frameworks into Ruby, and thus the configuration file doesn’t follow the same format as the rest of the log4j family (and other details may be different as well, which may catch people up who are familiar with log4j).
If you don’t need configurability built in, and you don’t particularly care about following the log4j pattern, then using the standard Logger class should probably be sufficient, and will help reduce your extra dependencies.