Hi Kishanthan,

On Thu, May 22, 2014 at 10:41 PM, Kishanthan Thangarajah <
kishant...@wso2.com> wrote:

>
>
>
> On Thu, May 22, 2014 at 5:06 PM, Sewwandi Perera <sewwa...@wso2.com>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.

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*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to