Hi,
On Thu, May 22, 2014 at 12:17 PM, Ishara Premadasa <[email protected]> wrote: > Hi Kishanthan, > > > On Thu, May 22, 2014 at 10:41 PM, Kishanthan Thangarajah < > [email protected]> wrote: > >> >> >> >> On Thu, May 22, 2014 at 5:06 PM, Sewwandi Perera <[email protected]>wrote: >> >>> Hi, >>> >>> Currently, WSO2 MB supports both Cassandra and Zookeeper profiles. The >>> "log4j.properties" file is configured to write all Cassandra related logs >>> to "cassandra_system.log" and all zookeeper related logs to "zookeeper.log". >>> >> >> So these separate log files are used only when those profiles started? >> >> >>> >>> We came up to a requirement where, we need to append all Cassandra logs >>> also to "wso2carbon.log" only when, the MB is started in Cassandra profile. >>> Refer [1] >>> >> >> I'm sorry, I did not get this requirement. You want to have cassandra >> related logs on a separate log file. I believe this is to make the >> cassandra log analyzing easy. So what is the purpose of again using carbon >> log file for that? >> > > The exact requirement is, since now we start Cassandra with mb profiles it > starts as an MB instance where in general users tends to monitor the > wso2carbon log and terminal log. However since the Cassandra related logs > get appended to a separate file, in case of Cassandra failure, the user > doesn't see any error logs etc. in wso2carbon log or in terminal logs where > Cassandra profile is running. > > Hence from users' perspective i think it is required to append the > cassandra (or zookeeper) logs into wso2carbon.log file only when MB > instance is started as a Cassandra or a Zookeeper server. If we append > these to root logger of default log4j.properties file the logs will be > displayed in non-profiled MB servers as well. That is why it is required to > keep two log4j.properties files. > I don't think we should keep multiple log4j.properties. I think what you done is a much better solution. i.e. To have have cassandra logs in a different log file. No need to unnecessarily complicate things by trying to redirect logs to wso2carbon.log when running a specific profile. What we can do is to clearly document this. i.e. Cassandra logs can be viewed by "cassandra_system.log". And it's more obvious for someone to see that log file when going to logs directory. And when it comes to log analyzing, using a tool like logstash, it's not that hard to configure multiple log files. My 2 cents. Thanks! > Thanks! > Ishara > >> >> >>> As I see, this can be get done only by maintaining two log4j properties >>> files with different configurations to be used in different profiles. >>> >>> Is it recommended to have two log4j properties files in one MB pack? >>> Else do you have any other solution for this? >>> >>> [1] https://wso2.org/jira/browse/MB-671 >>> >>> Thanks >>> -- >>> Sewwandi Perera >>> Software Engineer >>> >>> WSO2 Inc.; http://wso2.com >>> lean.enterprise.middleware >>> >> >> >> >> -- >> *Kishanthan Thangarajah* >> Senior Software Engineer, >> Platform Technologies Team, >> WSO2, Inc. >> lean.enterprise.middleware >> >> Mobile - +94773426635 >> Blog - *http://kishanthan.wordpress.com >> <http://kishanthan.wordpress.com>* >> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>* >> > > > > -- > Ishara Premasada > Software Engineer, > WSO2 Inc. http://wso2.com/ > > > *Blog : http://isharapremadasa.blogspot.com/ > <http://isharapremadasa.blogspot.com/>Twitter : > https://twitter.com/ishadil <https://twitter.com/ishadil> Mobile : > +94 714445832 <%2B94%20714445832>* > > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Isuru Perera Senior Software Engineer | WSO2, Inc. | http://wso2.com/ Lean . Enterprise . Middleware about.me/chrishantha
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
