FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mango adds a Log4J clone

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri May 28, 2004 6:40 pm    Post subject: Mango adds a Log4J clone Reply with quote

Beta 7 will include a new mango.log package that implements a subset of the popular Log4J facilities, including:
    A hierarchical set of named loggers, with inherited attributes
    Independent levels of activity for each logger
    A few common Appender classes
    Some preliminary Layouts (formatters)
This particular clone has even less overhead than others, because it propogates the hierarchy downward (from ancestor to child) for time-sensitive attributes.

- Kris


Last edited by kris on Fri May 28, 2004 9:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sun May 30, 2004 8:23 pm    Post subject: Reply with quote

For those not familiar with Log4J, you might check out the documentation over here: http://logging.apache.org/log4j/docs/documentation.html

- Kris
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon May 31, 2004 11:38 am    Post subject: Reply with quote

Mango.log seems to work quite well, although it's truly lightweight compared to the full Log4J. Here's the limitations:

    PropertyConfigurator parses a much simplified version of the property file. Mango.log only supports the settings of Logger levels at this time; setup of Appenders and Layouts are currently done "in the code", though this is not a great hardship.

    PatternLayout does not exist in mango.log, since it's the perhaps the largest component of all. I'm somewhat of the opinion that it's actually just as easy for a programmer to cut & paste one of the other Layouts, such as DateLayout, and simply change the snprintf() format (or do whatever else they like). It's certainly a lot more efficient at runtime.

    The NDC stuff is not currently implemented.

    Have yet to implement an XMLAppender (for Chainsaw support).
Other than that it has pretty much the same functionality as Log4J, including multiple appenders per node etc. Mango.log has a dependency upon mango.io for file access (PropertyConfigurator, FileAppender) and for one of the console appenders (StdioAppender). Other than that it's completely standalone, and it would be simple to replace/augment those appenders with alternatives.

- Kris
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Jun 04, 2004 8:14 pm    Post subject: Reply with quote

Mango.log now has an uber cool html administration console, allowing you to dynamically review and adjust the log/debug settings within your live application.

The console make use of the mango.servlet package, and can non-intrusively hook into any application using mango.log (server or otherwise).

I take my hat off to stonecobra for this sweet piece of work ...


Last edited by kris on Fri Jun 04, 2004 8:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Jun 04, 2004 8:22 pm    Post subject: Reply with quote

Mango.log now hooks into Chainsaw (hooks are in svn, but slated for beta-8 zipfile)

Chainsaw is a Java-based, remote logging monitor. It's written by the Log4J community, and has some really nice features. Still in alpha right now, so it has a couple of bugs. However, it will work just fine for most applications using mango.log

I can provide installation details for those who need it.

- Kris
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group