[
https://issues.apache.org/jira/browse/LOG4J2-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Winter updated LOG4J2-159:
------------------------------
Description:
I have problems while loading log4j.xml configuration file in osgi environment.
I have the following started equinox container:
+--------------------------------------------------------------------------------------------------------------------------------
| osgi> ss log4j
|
| Framework is launched.
|
| id State Bundle
| 58 RESOLVED my.log4j.xml.fragment
| Master=136
| 136 RESOLVED org.apache.commons.log4j-api_2.0.0.beta3
| Fragments=58
| 137 RESOLVED org.apache.commons.log4j-core_2.0.0.beta3
+--------------------------------------------------------------------------------------------------------------------------------
The log4j2 config file is packaged under my.log4j.xml.fragment.jar/log4j.xml.
If I have the upper bundle-configuration
- than the following output happens:
+--------------------------------------------------------------------------------------------------------------------------------
| ERROR StatusLogger Unable to locate a logging implementation, using
SimpleLogger
| FATAL Log4j_2 log4j-2.0.x logging
| ERROR Log4j_2 log4j-2.0.x logging
+--------------------------------------------------------------------------------------------------------------------------------
*QUICKFIX* If I update the
org.apache.commons.log4j-core_2.0.0.beta3.jar!/META-INF/MANIFEST.MF
- append: Fragment-Host: org.apache.commons.log4j-api
- than log4j2 configuration is loaded and work.
+--------------------------------------------------------------------------------------------------------------------------------
| osgi> ss log4j
|
| Framework is launched.
|
| id State Bundle
| 58 RESOLVED my.log4j.xml.fragment
| Master=136
| 136 RESOLVED org.apache.commons.log4j-api_2.0.0.beta3
| Fragments=58, 137
| 137 RESOLVED org.apache.commons.log4j-core_2.0.0.beta3
| Master=136
+--------------------------------------------------------------------------------------------------------------------------------
was:
I have problems while loading log4j.xml configuration file in osgi environment.
I have the following started equinox container:
{noformat}
osgi> ss log4j
Framework is launched.
id State Bundle
58 RESOLVED my.log4j.xml.fragment
Master=136
136 RESOLVED org.apache.commons.log4j-api_2.0.0.beta3
Fragments=58
137 RESOLVED org.apache.commons.log4j-core_2.0.0.beta3
{noformat}
The log4j2 config file is packaged under my.log4j.xml.fragment.jar/log4j.xml.
If I have the upper bundle-configuration
- than the following output happens:
{noformat}
ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger
FATAL Log4j_2 log4j-2.0.x logging
ERROR Log4j_2 log4j-2.0.x logging
{noformat}
*QUICKFIX* If I update the
org.apache.commons.log4j-core_2.0.0.beta3.jar!/META-INF/MANIFEST.MF
- append: Fragment-Host: org.apache.commons.log4j-api
- than log4j2 configuration is loaded and work.
{noformat}
Framework is launched.
id State Bundle
58 RESOLVED my.log4j.xml.fragment
Master=136
136 RESOLVED org.apache.commons.log4j-api_2.0.0.beta3
Fragments=58, 137
137 RESOLVED org.apache.commons.log4j-core_2.0.0.beta3
Master=136
{noformat}
> log4j.xml loading from classpath not working correct in osgi environment
> ------------------------------------------------------------------------
>
> Key: LOG4J2-159
> URL: https://issues.apache.org/jira/browse/LOG4J2-159
> Project: Log4j 2
> Issue Type: Bug
> Components: API, Core
> Affects Versions: 2.0-beta3
> Environment: win7, eclipse 3.7 64bit
> Reporter: Jan Winter
> Priority: Trivial
>
> I have problems while loading log4j.xml configuration file in osgi
> environment.
> I have the following started equinox container:
> +--------------------------------------------------------------------------------------------------------------------------------
> | osgi> ss log4j
> |
> | Framework is launched.
> |
> | id State Bundle
> | 58 RESOLVED my.log4j.xml.fragment
> | Master=136
> | 136 RESOLVED org.apache.commons.log4j-api_2.0.0.beta3
> | Fragments=58
> | 137 RESOLVED org.apache.commons.log4j-core_2.0.0.beta3
> +--------------------------------------------------------------------------------------------------------------------------------
> The log4j2 config file is packaged under my.log4j.xml.fragment.jar/log4j.xml.
> If I have the upper bundle-configuration
> - than the following output happens:
> +--------------------------------------------------------------------------------------------------------------------------------
> | ERROR StatusLogger Unable to locate a logging implementation, using
> SimpleLogger
> | FATAL Log4j_2 log4j-2.0.x logging
> | ERROR Log4j_2 log4j-2.0.x logging
> +--------------------------------------------------------------------------------------------------------------------------------
> *QUICKFIX* If I update the
> org.apache.commons.log4j-core_2.0.0.beta3.jar!/META-INF/MANIFEST.MF
> - append: Fragment-Host: org.apache.commons.log4j-api
> - than log4j2 configuration is loaded and work.
> +--------------------------------------------------------------------------------------------------------------------------------
> | osgi> ss log4j
> |
> | Framework is launched.
> |
> | id State Bundle
> | 58 RESOLVED my.log4j.xml.fragment
> | Master=136
> | 136 RESOLVED org.apache.commons.log4j-api_2.0.0.beta3
> | Fragments=58, 137
> | 137 RESOLVED org.apache.commons.log4j-core_2.0.0.beta3
> | Master=136
> +--------------------------------------------------------------------------------------------------------------------------------
--
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]