Showing posts with label log4erl. Show all posts
Showing posts with label log4erl. Show all posts

Sunday, April 19, 2009

Delays in the next version...

Hi,

I've promised previously that I'll deliver the next version of log4erl about now but due to unforeseeable work, I won't be able to. My apologies if I kept you waiting. All new features and bug fixes are already done but xml_appender is still under development. However, don't be too depressed, it's not going to take a long time. I think it'll be ready by next week :).

Ahmed

Friday, April 3, 2009

Log4erl group

Hi,

As a result of many questions/email regarding log4erl, I decided to start a new google group for log4erl project. Please subscribe to our mailing list on the URL below and participate for the continued support of log4erl.

http://groups.google.com/group/log4erl

Have a nice day.

Ahmed

Tuesday, March 31, 2009

Feedback for log4erl

Hi,

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.

Ahmed

Sunday, March 1, 2009

Log4erl v. 0.8.4 is out with SMTP logs

Hi,

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,

Ahmed

Saturday, February 28, 2009

Log4erl in github.com

Hi,

I have added log4erl to github.com repository. I've planned to adding this for sometime becuase it seems many people prefer git to svn and wanted to offer both choices. I will not stop updating google code's svn but I'll maintain both github.com and google code's. You can find the github page below

http://github.com/ahmednawras/log4erl

Have fun.

Ahmed

Saturday, February 7, 2009

Small step... log4erl 0.8.3

Hi,

A new version of log4erl (0.8.3) is out there. This release includes small additions and changes. This release has been staying in my disk for sometime now waiting for docs to be included in the release tar. I've just updated repository and added the tarball to the download section. An update to the manual is due soon.

The new additions include a console appender, few additions to the log_formatter and small fixes. Refer to README.txt file in the tarball for updated API document. The new additions to log_formatter includes 3 new specifiers (%i, %b, %B) which outputs milliseconds, short month's name (e.g. Feb), month's name (e.g. February).

Next release will include SMTP logger and perhaps a simple configuration file.

As usual, please send your comments and suggestions to my email (can be found in README.txt file). Next is to update the manual. Until then, enjoy.

Ahmed

Wednesday, December 3, 2008

Log4erl 0.8.2 is out

Hi All,

It's been a long time and as usual been busy with other projects. However, finally another release is out. I've just released version 0.8.2 of log4erl. It's a small step but, hopefully, in the right direction. This code has been in my computer for some time now.

The most important addition here is log4erl:change_format/2,3. This is similar to PatternLayout in Log4j. A list of specifiers can be found in README.txt file. Using log4erl:change_format/2,3, you'll be able to change the layout of the outputed message. Also, there's log4erl:change_log_level/1,2 plus some bug fixes.

I think this is a good time to talk about where this project is going and where I do intend to take it. I've got some questions regarding performance, email logging, Syslog...etc. All of these features are within the scope of log4erl. However, it's too early to say when they will be added. The main concern for me now is to freeze the API and make log_manager stable. Once this is done, adding new formatters will be simpler. Performance metrics and optimization should be done around the time log_manager is stable.

Having said that, I think console_formatter is necessary and I'd like to add SMTP formatter soon. By log4erl 1.0, I intend to have at least 3 formatters: file_formatter, console_formatter, smtp_formatter. Also, a performance benchmark should be published by that time. The expected release of version 1.0 is around July 2009 but please don't bet on it. There are a lot of variables here and I don't want to give promises. This is just an educated guess.

I had some questions about distributed logging. Such a feature is not intended to be part of the short-term plan for log4erl. I started log4erl to be used in my own projects, which are mainly run in single-server machines and decided to share it with the rest of the community. I believe distributed logging needs a more careful design and testing methods, although I believe implementing distributed logging is simpler in erlang than other languages. For now, the only distributed mechanism log4erl can do is through rpc:call/4.

Anyways, back to work. The next step is the long-awaited manual for log4erl 0.8. Until then, have a good time.

Sunday, August 3, 2008

API changes in 0.8

I haven't got a lot of time to explain the API changes in 0.8. I'll get around to this task when possible. For now, I'll quickly introduce some changes.

In 0.7, Log4erl didn't have the concept of appender. For version 0.7, logger and appender where the same things. So, when you add a new logger with specific properties, you basically create a logger, add an appender with the properties. That's why version 0.7 had log4erl:add_file_logger/1,2 functions.

The biggest change in 0.8, is the separation of both. So now, you can create a logger and add as many appenders to it. Currently, there are only file_appender and dummy_appender. Dummy_appender is basically dumps all messages sent to it. It can be useful during development. An example for using the new API, the following code adds 2 appenders to the default logger, one is a file_appender and the other is dummy_appender.

> log4erl:add_appender({file_appeneder, appender1}, {"../logs", "logger1", {size, 100000}, 4, "elog", warn}).
> log4erl:add_appender({dummy_appender, dummy}, "").

As you can see above, developer is required to supply a tuple of name of the module and a name for the appender as the first agrument to add_appender/2. The 2nd item in the tuple is an identifier used by Log4erl. You can get all appenders for a logger using log4erl:get_appenders/0,1

Users can also use add_file_appender/2,3 and add_dummy_appender/2,3 as convenient functios for add_appender.

Another useful function in the API is change_log_level/1,2, by which users can change log level without having to restart Log4erl.

I hope this is useful for all of Log4erl 0.8 users. As I said, I'll get around to modifiying the manual in google code to reflect these changes. Until then, have a nice day :)

Monday, July 28, 2008

Hi,

This is the first blog for log4erl. Log4erl is a project aimed to implement a generic logger for Erlang. Erlang currently has its own logger and it has its merits. However, coming from Java land, I prefer something similar to Log4J and Log4* family of loggers. That's why I decided to start log4erl. I've just uploaded version 0.8.1 to google code's page of the project ("http://code.google.com/p/log4erl"). Please use it and let me know your feedback.

Obviously, the project has just started and there's a lot to do. Any contributions, comments are welcome. Cheers!