Tuesday, March 31, 2009

Feedback for log4erl


I've just seen some comments to say about a couple of emails I received from log4erl users. The first was from Loren of StackHub requesting XML appneder and the other from Kuba submitting an update to have log4erl handle calls to error_logger and requesting a fix to file_appender.

The bug in file_appender is that it copies files during rotation instead of just renaming them. For large files, this could results in timeouts or even crashes the program. I don't know what was I thinking but it's need a fix.

XML appender should be available in the next release and I'll also include Kuba's code and a fix to file_appender along. Thanks to Loren and Kuba for the feedback. Keep your suggestions coming and good luck.


Tuesday, March 24, 2009

Syslog and file-based configuration in version 0.8.5


A new version of log4erl is updated in both google code and github.com repositories. The new features here are introduction of file-based configuration and syslog_appender. To get more details, please read updated documentations in files 'README.txt', 'API.txt', 'Appenders_API.txt', 'CHANGELOG.txt' and the new file 'CONFIGURATION.txt' for details of the file-based configuration. You can also find an example in 'priv/log4erl.conf'.

I've also made changes to the format with the addition of %I, %S, and %Z specifiers to output ISO-8601 standard output and timezone information. Also, %d and %j specifiers are changed to be ISO-compatible.

Enjoy the new release and keep the bug reports coming.



Sunday, March 1, 2009

Log4erl v. 0.8.4 is out with SMTP logs


Today, version 0.8.4 has been released. The main addition here, as promised, is smtp_appender. As the name imply, this allows for sending log messages to emails.

For this, I've used smtp_client written by Michael Bradford (http://erlang.org/user.html#smtp_client-1.1) with some modifications that allows it to work with Erlang/OTP R12B. I don't think the additions will allow it to work with Erlang/OPT R11B or earlier. If so, you can download and use the original smtp_client from erlang.org instead of the included module in Log4erl distribution.

smtp_client doesn't support SSL authentication, so smtp_appender might not work with gmail or some other email servers that require SSL, but for everything else, this should be enough. Please send me your feedback on this.

Note however that you should use smtp_appender with fatal or warn messages and shouldn't be used with more verbose log levels as the current implementation connects every time to the email server when sending email. I think this should be clear but just wanted everyone to know.

Also, there are 2 other additions, the most important is the feedback when error. For example, if you tried to add an appender with name already registered, you should get an error. Please check README.txt and CHANGELOG.txt for more info.

Log4erl is evolving rapidly in recent days. Next I'm going to add syslog appender and, possibly, html appender. Also, I'll try to add the much needed configuration file for log4erl.

Anyways, we still need to do a lot of work before reaching the 1.0 milestone on July.

Good luck,