You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/10/05 02:33:33 UTC
[2/2] git commit: Add section on OSGi ContextSelector usage.
Add section on OSGi ContextSelector usage.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/f36b214a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/f36b214a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/f36b214a
Branch: refs/heads/master
Commit: f36b214ab7fb1fcae6ee661a2b68f677447c0bcb
Parents: 709f02c
Author: Matt Sicker <ma...@apache.org>
Authored: Sat Oct 4 19:33:29 2014 -0500
Committer: Matt Sicker <ma...@apache.org>
Committed: Sat Oct 4 19:33:29 2014 -0500
----------------------------------------------------------------------
src/site/xdoc/manual/logsep.xml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/f36b214a/src/site/xdoc/manual/logsep.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/logsep.xml b/src/site/xdoc/manual/logsep.xml
index 9282f72..d208a6c 100644
--- a/src/site/xdoc/manual/logsep.xml
+++ b/src/site/xdoc/manual/logsep.xml
@@ -32,7 +32,7 @@
discuss some of these cases and ways to accomplish this.
</p>
<subsection name="Use Cases">
- <a name="Use Cases"/>
+ <a name="UseCases"/>
<p>
This section describes some of the use cases where Log4j could be used and what its desired behavior
might be.
@@ -65,6 +65,17 @@
the issues that can occur when multiple components try to write to the same file(s) through different
File objects, channels, etc.
</p>
+ <h4>OSGi Applications</h4>
+ <p>
+ An OSGi container physically separates each JAR into its own ClassLoader, thus enforcing modularity of
+ JARs as well as providing standardized ways for JARs to share code based on version numbers. Suffice to
+ say, the OSGi framework is beyond the scope of this manual. There are some differences when using Log4j
+ in an OSGi container. By default, each JAR bundle is scanned for its own Log4j configuration file.
+ Similar to the web application paradigm, every bundle has its own LoggerContext. As this may be
+ undesirable when a global Log4j configuration is wanted, then the
+ <a href="extending.html#ContextSelector">ContextSelector</a> should be overridden with
+ <code>BasicContextSelector</code> or <code>JndiContextSelector</code>.
+ </p>
</subsection>
<subsection name="Approaches">
<a name="Approaches"/>