[Yanel-dev] Make WAR files deployable without reconfiguration

Mehmet Birgi mehmet.birgi at wyona.com
Mon May 24 12:06:36 CEST 2010


On Mon, May 24, 2010 at 10:09 AM, Michael Wechner
<michael.wechner at wyona.com> wrote:
> Mehmet Birgi wrote:
>>
>> 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?
>>
>
> because it is very convenient, for example one can do
>
> tail -F logs/*

ok, i hadn't thought of that. but if all clusters would write to the
same logfile, it would achieve the same effect, i guess? but i have
just realized that this would somewhat defeat the purpose, as we were
talking about hosting the logfile in the tomcat directory :-(

hmmm. it's more complicated then i thought ;-)

so, afaicu, we need to find a way to define the location of the
logfiles outside of the tomcat directories, right?

or, as an alternative, maybe we could make catalina.base the default
place, while it would be possible to override this, e.g. in the case
of cluster deployment. this would make automatic deployment possible,
while keeping the flexibility. wdyt?


>
> also one can specify one directory within the documentation instead two.
>
> I am sure as soon as you will start using a clustered environment on a daily
> basis you will notice that it helps.
>
> Cheers
>
> Michi
>>
>> 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
>>>
>>>
>>
>>
>>
>>
>
> --
> 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