Hi,

I agree with Lukasz: I have no problem to document and improve the way to include such appender in custom distribution, but I don't think it's a good idea to have it shipped by default.

I could also be a Decanter new collector/appender (as we already have a log collector/appender).

Regards
JB

On 03/16/2016 05:38 PM, Łukasz Dywicki wrote:
Hey Vladimir,
While I see reasoning to have this feature, I must say it is not a core
requirement to all users. If we would decide to have such appender we
easily can run into situation that everyone will want to have it’s own
appender and it’s dependencies installed/available by default in Karaf.
Sadly (in my perception) we can’t agree for that. If you would like to
push this forward please answer to this mail and send reply to
d...@karaf.apache.org <mailto:d...@karaf.apache.org> so we could continue
there. We need to keep in mind, that logging is part of foundation
functionalities offered in Karaf available in same shape under minimal
distribution.

What I can recommend you is custom (re)packaging of Karaf. This will
avoid troubles with manual modifications in configuration files and can
be fully automated with maven tooling we offer. All you need to do is
proper feature definition which will cause generation of
startup.properties. You can also override default configuration files
(ie. org.ops4j.pax.logging.cfg). In this way you will be able to produce
Karaf assembly right for you, your clients and colleagues.

Kind regards,
Lukasz
—
Apache Karaf Committer & PMC
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org


Wiadomość napisana przez Владимир Коньков <vkon...@citc.ru
<mailto:vkon...@citc.ru>> w dniu 16 mar 2016, o godz. 11:32:

Hi

As of version 4.1 Karaf will use Log4J 2 as logging backend (thanx,
Guillaume). It’s very good news, because it greatly simplify
configuration of robust production logging - compression, flexible
rotation rules, async, fallback logging. All this features comes out
of the box with Log4J 2. No more custom appenders needs to be
installed at first start time to achieve basic production quality
configuration.

But for advanced production logging one option is missing out of the
box - logging analysis tools integration, line ELK, Fluentd, Graylog,
Splunk. To achieve this capability in robust way we should again
install custom appender ( like https://github.com/Graylog2/log4j2-gelf
) at first start time.

I know, it can be installed as regular bundle fragment after first
startup. But installing appender this way has some drawbacks that make
it unacceptable for production usage:
1. First startup logs not coming in appender installed after start.
(stopper for automated deployments)
2. If appender configured before bundle cache initialization - there
is errors in file logs about missing appender class. Cache clean up is
not so rare on production deployment, usually it is simpler to clean
cache before some major software update that dealing with deps
conflicts on upgrade.
3. After installation of custom appender bundle host bundle should be
refreshed (some log entries may be lost).

If custom appender is MAIN logging channel restriction above not
acceptable for us. Workaround is simple but very inconvenient to
support for different versions of Karaf:
 - add appender jar to system lib
 - modify startup.properties to incude appender bundle

My proposal: include GELF Log4J 2 appender in standart distribution.
In such way we provide log streaming capability to all major logging
analysis tools. Because of growing adoption of log analysis tools it
may be good addition to Karaf feature portfolio in addition to own
solution Decanter.

I can provide PR on Github with carefully repackaged appender lib that
not export anything to other bundles.

What do you think?

Thanx,
Vladimir Konkov



--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to