Hi Sameera,
With the latest move of log4j.properties to conf dir, now log4j is not
initialized. Am I missing something?


On Sun, Mar 18, 2012 at 1:24 AM, Sameera Jayasoma <[email protected]> wrote:

> Hi Devs,
>
> There were number of incidents where users have reported issues related to
> logging, when they tried to add a new log4j.properties file to their
> webapps, services, etc. And Carbon initialization code(Non-OSGi) does not
> use logging, instead System.out were used. It is because of the issues
> we've been facing with commons-logging & log4j in non-OSGi and OSGi spaces.
>  With these latest changes to Carbon, we thought of fixing this
> long-running issue properly.
>
> Carbon OSGi container is launched by the org.wso2.carbon.server package
> which is running in non-OSGi world. This code does not use logging at all,
> simply uses System.out. We need to to user proper logging there also. Here
> is the proposal to fix these logging related issues.
>
> Current log4j.properties file contains the TenantAwarePatternLayout which
> is written by us. This class comes from an OSGi bundle. But the problem is
> we cannot use this property file for the Carbon initialization code. We
> need to a simple and separate one without the TenantAwarePatternLayout.
>
> CARBON_HOME
> |--- lib
>      |---- log4j.properties (For Carbon initialization code.)
>      |---- org.wso2.carbon.server-4.0.0-SHAPSHOT.jar
>
> |--- repository
>      |---- conf
>           |---- log4j.properties
>
> IMHO, log4j.properties file of the Carbon platform should be placed inside
> the repository/conf. Its the correct place to put it as other config files.
>
> With these changes, I could successfully deploy a webapp with a separate
> log4j.properties file.
>
> Thanks,
> Sameera.
> --
> Sameera Jayasoma
> Technical Lead and Product Manager, WSO2 Carbon
>
> WSO2, Inc. (http://wso2.com)
> email: [email protected]
> blog: http://tech.jayasoma.org
>
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks,
Denis
----------------------------------------------------------
*Denis Weerasiri*
Software Engineer
Integration Technologies Team, WSO2 Inc.; http://wso2.com,
*email: denis <http://goog_277208233/>** [AT] wso2.com <http://wso2.com/>*
*phone: +94117639629
*
*site: 
**https://sites.google.com/site/ddweerasiri/*<https://sites.google.com/site/ddweerasiri/>
*blog: **http://ddweerasiri.blogspot.com* <http://ddweerasiri.blogspot.com/>
*
twitter: **http://twitter.com/ddweerasiri* <http://twitter.com/ddweerasiri>*
linked-in: 
**http://lk.linkedin.com/in/ddweerasiri*<http://lk.linkedin.com/in/ddweerasiri>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to