You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Alex Huang <Al...@citrix.com> on 2013/12/18 01:03:13 UTC

cloudstack no longer monitoring log4j-cloud.xml?

Hey Darren,

I've just been alerted that cloudstack doesn't seem to be dynamically loading the log4j configurations any more.  This means you need to restart the server every time someone changes the logging level.  This was done by the componentlocator previously.  Was this lost during the spring changes?  Can you bring the functionality back?  

I saw this in master but my guess is it's in 4.3 as well.

Thanks.

--Alex

Re: cloudstack no longer monitoring log4j-cloud.xml?

Posted by Darren Shepherd <da...@gmail.com>.
I just tried on my desktop and it works.  LogUtils from ACS just calls
DOMConfigurator.configureAndWatch() which spawns a thread called
Filewatchdog.  It just sleep for 60 seconds and then checks the
modified time on the log4j-cloud.xml.  I haven't tested on a really
production setup though.  Can you tell me if you see the line with
"log4j configuration found at ...."

Darren

On Tue, Dec 17, 2013 at 10:20 PM, Alex Huang <Al...@citrix.com> wrote:
> Darren,
>
> Iirc, all I did was make a thread available to log4j to monitor the config file that it had loaded.
>
> I checked the open file handles with Sheng and couldn't find any open file handles to any log4j-cloud.xml, which if this was done, will always have an open file handle.
>
> --Alex
>
>> -----Original Message-----
>> From: Darren Shepherd [mailto:darren.s.shepherd@gmail.com]
>> Sent: Tuesday, December 17, 2013 9:16 PM
>> To: Alex Huang
>> Cc: dev@cloudstack.apache.org
>> Subject: Re: cloudstack no longer monitoring log4j-cloud.xml?
>>
>> Cc'ing dev list from the right email
>>
>> Darren
>>
>> > On Dec 17, 2013, at 10:14 PM, "Darren Shepherd"
>> <da...@citrix.com> wrote:
>> >
>> > I'll look at it, but that util method that loads the log4j-cloud.xml is still being
>> called, I can't remember the api off the top of my head.
>> >
>> > My first guess would actually be that the file is getting loaded from a
>> different place than /etc.  ACS packages a lot of files twice and I often see the
>> scripts files being loaded from web-inf/classes and not the other location in
>> /usr.
>> >
>> > Darren
>> >
>> >> On Dec 17, 2013, at 5:03 PM, "Alex Huang" <Al...@citrix.com>
>> wrote:
>> >>
>> >> Hey Darren,
>> >>
>> >> I've just been alerted that cloudstack doesn't seem to be dynamically
>> loading the log4j configurations any more.  This means you need to restart
>> the server every time someone changes the logging level.  This was done by
>> the componentlocator previously.  Was this lost during the spring changes?
>> Can you bring the functionality back?
>> >>
>> >> I saw this in master but my guess is it's in 4.3 as well.
>> >>
>> >> Thanks.
>> >>
>> >> --Alex

RE: cloudstack no longer monitoring log4j-cloud.xml?

Posted by Alex Huang <Al...@citrix.com>.
Darren,

Iirc, all I did was make a thread available to log4j to monitor the config file that it had loaded. 

I checked the open file handles with Sheng and couldn't find any open file handles to any log4j-cloud.xml, which if this was done, will always have an open file handle.  

--Alex

> -----Original Message-----
> From: Darren Shepherd [mailto:darren.s.shepherd@gmail.com]
> Sent: Tuesday, December 17, 2013 9:16 PM
> To: Alex Huang
> Cc: dev@cloudstack.apache.org
> Subject: Re: cloudstack no longer monitoring log4j-cloud.xml?
> 
> Cc'ing dev list from the right email
> 
> Darren
> 
> > On Dec 17, 2013, at 10:14 PM, "Darren Shepherd"
> <da...@citrix.com> wrote:
> >
> > I'll look at it, but that util method that loads the log4j-cloud.xml is still being
> called, I can't remember the api off the top of my head.
> >
> > My first guess would actually be that the file is getting loaded from a
> different place than /etc.  ACS packages a lot of files twice and I often see the
> scripts files being loaded from web-inf/classes and not the other location in
> /usr.
> >
> > Darren
> >
> >> On Dec 17, 2013, at 5:03 PM, "Alex Huang" <Al...@citrix.com>
> wrote:
> >>
> >> Hey Darren,
> >>
> >> I've just been alerted that cloudstack doesn't seem to be dynamically
> loading the log4j configurations any more.  This means you need to restart
> the server every time someone changes the logging level.  This was done by
> the componentlocator previously.  Was this lost during the spring changes?
> Can you bring the functionality back?
> >>
> >> I saw this in master but my guess is it's in 4.3 as well.
> >>
> >> Thanks.
> >>
> >> --Alex

Re: cloudstack no longer monitoring log4j-cloud.xml?

Posted by Darren Shepherd <da...@gmail.com>.
Cc'ing dev list from the right email

Darren

> On Dec 17, 2013, at 10:14 PM, "Darren Shepherd" <da...@citrix.com> wrote:
> 
> I'll look at it, but that util method that loads the log4j-cloud.xml is still being called, I can't remember the api off the top of my head.
> 
> My first guess would actually be that the file is getting loaded from a different place than /etc.  ACS packages a lot of files twice and I often see the scripts files being loaded from web-inf/classes and not the other location in /usr.  
> 
> Darren
> 
>> On Dec 17, 2013, at 5:03 PM, "Alex Huang" <Al...@citrix.com> wrote:
>> 
>> Hey Darren,
>> 
>> I've just been alerted that cloudstack doesn't seem to be dynamically loading the log4j configurations any more.  This means you need to restart the server every time someone changes the logging level.  This was done by the componentlocator previously.  Was this lost during the spring changes?  Can you bring the functionality back?  
>> 
>> I saw this in master but my guess is it's in 4.3 as well.
>> 
>> Thanks.
>> 
>> --Alex

Re: cloudstack no longer monitoring log4j-cloud.xml?

Posted by Darren Shepherd <da...@citrix.com>.
I'll look at it, but that util method that loads the log4j-cloud.xml is still being called, I can't remember the api off the top of my head.

My first guess would actually be that the file is getting loaded from a different place than /etc.  ACS packages a lot of files twice and I often see the scripts files being loaded from web-inf/classes and not the other location in /usr.  

Darren

> On Dec 17, 2013, at 5:03 PM, "Alex Huang" <Al...@citrix.com> wrote:
> 
> Hey Darren,
> 
> I've just been alerted that cloudstack doesn't seem to be dynamically loading the log4j configurations any more.  This means you need to restart the server every time someone changes the logging level.  This was done by the componentlocator previously.  Was this lost during the spring changes?  Can you bring the functionality back?  
> 
> I saw this in master but my guess is it's in 4.3 as well.
> 
> Thanks.
> 
> --Alex