So [log4j|http://logging.apache.org/log4j/1.2/] is slow?
And [log4j2 | http://logging.apache.org/log4j/2.x/] is faster?
I only want a simple convenient logging library.Well, I sat down and after view hours the first implementation was done:
Attribute | Comment |
---|---|
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 de.bb.product.bb_log-0.0.1.jar is ok. If the other de.bb libraries are used too, you can use de.bb.log-0.0.1.jar which is around 40k including sources, README, COPYING ... |
<log> <formatter name="F1" logFormat="%d %p [%t] %C - %m"/> <appender name="A1" type="file" file="mylogfile" formatter="F1" /> <logger path="de.bb" appender="A1" level="DeBuG"/> </log>
private final static Logger LOG = Logger.getLogger(MyClass.class);
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"));
date | comment |
---|---|
2021-12-26 | maintenance release 0.1.5 /repo/de/bb/log/0.1.5/log-0.1.5.jar |
... | ... |
2013-12-09 | initial release bb_log Version 0.0.1 |
2013-12-09 | Initial release de.bb.log-0.0.1-SNAPSHOT.jar (Needs de.bb.io and de.bb.util, but includes sources). |
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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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="http://www.gnu.org/licenses/" target="_blank">http://www.gnu.org/licenses/</a>.