[
https://issues.apache.org/jira/browse/LOG4J2-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13764747#comment-13764747
]
Roland Weiglhofer edited comment on LOG4J2-389 at 9/11/13 9:00 PM:
-------------------------------------------------------------------
How to:
1. Download Apache Felix or a similar OSGi container.
http://felix.apache.org/downloads.cgi#framework
2. Start Apache Felix.
http://felix.apache.org/documentation/subprojects/apache-felix-framework/apache-felix-framework-usage-documentation.html
3. deploy Log4j2 libraries to the bundle-folder.
4. create a test bundle with the maven-bundle-plugin, deploy it and log some
messages. (You can implement the class "BundleActivator" which starts a thread
that aquires a logger, don't forget to define
<Bundle-Activator>your.bundle.ActivatorClass</Bundle-Activator> in the pom,
see:
http://blog.knowhowlab.org/2010/10/osgi-tutorial-4-ways-to-activate-code.html ,
http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html)
Type "lb" in the gogo-console which lists all bundles and their states. Bundles
should be in state "acitve", fragmented bundles should be in state "resolved"
otherwise something is going wrong. Try also the inspect command to print
"wires" between bundles if you want to check package dependencies.
print requirements of a bundle: inspect req * [bundle id]
print capabilities of a bundle: inspect cap * [bundle id] (wiring.package,
wiring.host and wiring.bundle are the classifiers of a dependency.)
was (Author: rol):
How to:
1. Download Apache Felix or a similar OSGi container.
http://felix.apache.org/downloads.cgi#framework
2. Start Apache Felix.
http://felix.apache.org/documentation/subprojects/apache-felix-framework/apache-felix-framework-usage-documentation.html
3. deploy Log4j2 libraries to the bundle-folder.
4. create a test bundle with the maven-bundle-plugin, deploy it and log some
messages.
Type "lb" in the gogo-console which lists all bundles and their states. Bundles
should be in state "acitve", fragmented bundles should be in state "resolved"
otherwise something is going wrong. Try also the inspect command to print wires
between bundles if you want to check package dependencies.
print requirements of a bundle: inspect req * [bundle id]
print capabilities of a bundle: inspect cap * [bundle id]
> lightweight version without database and http stuff
> ---------------------------------------------------
>
> Key: LOG4J2-389
> URL: https://issues.apache.org/jira/browse/LOG4J2-389
> Project: Log4j 2
> Issue Type: Improvement
> Components: API, Core
> Affects Versions: 2.0-beta9
> Environment: Maven
> Reporter: Roland Weiglhofer
> Labels: Maven, dependencies, optional
> Attachments: Log4j2_osgi_opt_dep.patch
>
>
> Required is a lightweight version without database and http stuff, so I do
> not need to install libraries, which I do not need. All the (transitiv)
> log4j2-dependencies together are much bigger than my own application. This is
> a realy big drawback of log4j2! log4j-core-osgi-reduced depends on log4j-core
> and thus, on all transitiv dependencies, although they are declared as
> "optional".
> Thanks & Regards
> Roland
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]