Skip to main content

ultralog - logging framework for high-performance applications

No replies
mvladimirov
Offline
Joined: 2004-05-04
Points: 0

Let me present ultralog (http://code.google.com/p/ultralog/) - yet another logging framework for java, which specifically focus on demands of high-performance applications.
It offers garbage-free, lock-free logging, yet having clear syntax.
Main idea is that log message templates are compiled into Java bytecode at run time or even at compile time.
Here is small usage example taken from ultralog WiKi (http://code.google.com/p/ultralog/wiki/TableOfContents):

import com.google.code.ultralog.BasicLogger;
import com.google.code.ultralog.LogMessage;
import com.google.code.ultralog.LoggerManager;

public class HelloUser
{
    public static void main (String [] args)
    {
        HelloLogger logger = LoggerManager.createLogger (HelloLogger.class);

        if (logger.isInfoEnabled ())
            logger.hello (System.getProperty ("user.name"));
   }

    protected interface HelloLogger extends BasicLogger
    {
        @LogMessage (level = INFO, template = "Hello, ${1}!")
        void hello (String user);
    }
}

As you can see, developer defines log messages as methods of custom logger interface, and ultralog generates implementation for this interface on the fly.
Such approach allows substituting arbitrary number of variables into log message, even variables of primitive types, without allocating any new objects.
The project is at early stage of development and still lacks essential features such as support for configuration files, but core API and functionality is already there.

Any feedback will be appreciated.