bb_log a tiny and fast logger for Java

bb_log is a Logger for Java which only requires one small JAR in your classpath provides superior Performance and is still as simple to use as other Loggers while providing the most used Features (even message variables).


It's hosted at


When I considered to build a new Major Version of my BEJY Server, I wanted to use some state of the art logging. So I had a look to log4j plus SLF4J. Both are well known.

Then I detected that there is a new Version coming: log4j2 which will provide Major speedups.
So [log4j|] is slow?
(Yes it is.)
And [log4j2 |] is faster?
(Yes it is)
But the size of the log4j2 jars is ridiculous huge. Way bigger than my Server implementation with all protocols together.
I only want a simple convenient logging library.
Well, I sat down and after view hours the first implementation was done:
config file support only one variant in XML, similar to established XML config files
hierarchical Loggers yes, but only the first configured is used.
appenders stdout and file appenders right now
formatters reusable log line formatters
message variable Expansion yes, numbered {0}, {1} ... will be replaced with the corresponding Argument.
log line configurable yes
performance in my test even twice as fast than log4j2 with asynchronous IO.
reloadable config yes, not automatically, but without losing log lines.
tiny slightly above 50k for is ok. If the other libraries are used too, you can use which is around 40k including sources, README, COPYING ...


  1. add the standalone bb_log jar file to your class path.
  2. add a XML file bblog.xml to you class path
    	<formatter name="F1" logFormat="%d %p [%t] %C - %m"/>
    	<appender name="A1" type="file" file="mylogfile" formatter="F1" />
    	<logger path="" appender="A1" level="DeBuG"/>
  3. create Loggers where you need them:
      private final static Logger LOG = Logger.getLogger(MyClass.class);
  4. use the Loggers to log:
      LOG.debug("Argument 0: {0} invalid: {{ out of range: {99} Argument 1: {1}  again Argument 0: {0}", "dat is arg 0", "dis is arg 1", new Exception("foo"));
    2021-12-26maintenance release 0.1.5 /repo/de/bb/log/0.1.5/log-0.1.5.jar
    2013-12-09initial release bb_log Version 0.0.1
    2013-12-09Initial release (Needs and, but includes sources).


  5. Here you find the apidoc.
  6. add Exceptions as last Argument in logging calls, to get the stacktrace into your log.


This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <a href="" target="_blank"></a>.

rev: 1.7