[Yanel-dev] Make WAR files deployable without reconfiguration

Mehmet Birgi mehmet.birgi at wyona.com
Mon May 24 09:08:17 CEST 2010


On Sun, May 23, 2010 at 11:49 PM, Michael Wechner
<michael.wechner at wyona.com> wrote:
> Mehmet Birgi wrote:
>>
>> On Sun, May 23, 2010 at 1:21 AM, Michael Wechner
>> <michael.wechner at wyona.com> wrote:
>>
>>>
>>> Hi
>>>
>>> In order to make Yanel WAR files deployable without reconfiguration I
>>> would
>>> like to use ${catalina.base} within the log4j config:
>>>
>>> conf/log4j.properties
>>>
>>> which means the log files would be located at
>>>
>>> YANEL_HOME/local/apache-tomcat-5.5.20/logs/
>>>
>>> (if the default Tomcat is used)
>>>
>>> instead
>>>
>>> YANEL_HOME/logs
>>>
>>> WDYT?
>>>
>>
>> I think that this is no problem, but we might want to change the
>> default name of the logfile to something including "yanel" to make it
>> easier to find. Maybe "yanel-cnode1.log"? Actually, if it is under the
>> actual tomcat instance, the "cnode1" part would probably not be
>> needed,
>
> now you are saying that I remember why we didn't change it, because we also
> want to support clustered
> environments out-of-the-box, which are sharing the same log directory, such
> that it is easier to debug.

why do you think that having both logs in one directory is important?
as long as they are 2 separate files, i don't understand why it makes
a big difference. if both clusters could share a logfile, now that
might be convenient, but that doesn't seem to be possible without
considerable changes:

"Log4j's FileAppender do not allow for two JVM's writing to the same
file. If you try, you'll get corrupt log files. However, logback,
log4j's successor, in prudent mode allows two appenders even in
different JVMs to write to the same file."

(found here: http://stackoverflow.com/questions/1253586/can-two-log4j-fileappenders-write-to-the-same-file)

more info on logback:
http://logback.qos.ch/index.html
http://logback.qos.ch/manual/appenders.html#prudent

apparently there is also a migrator: http://www.slf4j.org/migrator.html



>
> Let me think once more about it.
>
> Thanks
>
> Michi
>>
>>  I guess, so even "yanel.log" might be sufficient.
>>
>> Also it might be helpful to echo a message on where to find find the
>> logfile when yanel is started.
>>
>> Cheers,
>>
>> Memo
>>
>>
>>
>>>
>>> Thanks
>>>
>>> Michi
>>> --
>>> Yanel-development mailing list Yanel-development at wyona.com
>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>>
>>>
>>
>>
>>
>>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>



-- 
Mehmet Birgi
www.wyona.com


More information about the Yanel-development mailing list