When you're debugging, you should modify the log4j-cloud.xml that jetty is 
reading.  I can't remember where it is by default.  I have to find this file 
everytime but it's not any of the files you find in the source as it is copied 
to some jetty deployment directory.  Maybe someone knows where that file is.  
If not, if you're on linux, you can always find out by doing a lsof on the java 
process and see which log4j-cloud.xml it is using.  I assume you can do 
something similar on the mac.  On windows, there's a utility called handle from 
system internals package that will tell you.

Doing this means you'll lose your setting everytime you do a  mvn clean 
install.  So editing one of the files in the source tree will give you a more 
permanent solution.  However, you have to be careful not to check it in.  

BTW, CloudStack gets updated live on logging configs so there's no need to 
restart cloudstack after you change the configuration.  Just edit the file and 
save and within a minute or so, cloudstack will use the new logging 
configuration.

--Alex

> -----Original Message-----
> From: Daan Hoogland [mailto:dhoogl...@schubergphilis.com]
> Sent: Wednesday, June 12, 2013 3:48 PM
> To: dev@cloudstack.apache.org
> Subject: RE: help on db code wanted
> 
> Glad to be teaching for a change;) quite common greeting in dutch if you
> don't know how to start.
> 
> About the log4j-cloud file. There is a lot of them. I suppose I chose the one
> from secondary-storage and they all get picked up?  I also see some .in files.
> No need to worry about those?
> 
> -----Original Message-----
> From: Alex Huang [mailto:alex.hu...@citrix.com]
> Sent: donderdag 13 juni 2013 0:44
> To: dev@cloudstack.apache.org
> Subject: RE: help on db code wanted
> 
> Nice...learn something new every day.
> 
> --Alex
> 
> > -----Original Message-----
> > From: Daan Hoogland [mailto:dhoogl...@schubergphilis.com]
> > Sent: Wednesday, June 12, 2013 3:36 PM
> > To: dev@cloudstack.apache.org
> > Subject: RE: help on db code wanted
> >
> > Thanks Alex,
> >
> > I didn't think of live stock yet, but that is a good backronym as
> > well. The original is latin : lectori salutem (I hope I have the
> > inclinations right) meaning readers be greeted
> >
> > -----Original Message-----
> > From: Alex Huang [mailto:alex.hu...@citrix.com]
> > Sent: donderdag 13 juni 2013 0:31
> > To: dev@cloudstack.apache.org
> > Subject: RE: help on db code wanted
> >
> > Daan,
> >
> > You can enable trace logging on the category
> > "com.cloud.utils.db.Transaction.Statement" in log4j-cloud.xml.  It
> > will log every SQL statement sent to the DB.  Look for update to the
> > specific table, that will give you an indication what the db layer
> > thinks is being set.  The logs grow very quickly with this on though.
> >
> > BTW,  what does LS mean?  Are you referring to us as some sort of
> > animal farm characters (Live Stock)?
> >
> > --Alex
> >
> > > -----Original Message-----
> > > From: Daan Hoogland [mailto:daan.hoogl...@gmail.com]
> > > Sent: Wednesday, June 12, 2013 3:13 PM
> > > To: dev
> > > Subject: help on db code wanted
> > >
> > > LS,
> > >
> > >
> > > I am trying to remove a double slash from the field install_path in
> > > the table template_host_ref. It would seem to me that this can be
> > > done by removing it in the VMTemplateHostVO, that gets used by the
> > > VMTemplateHostDao to write to the database. I added a fixPath
> > > function that I stole from some other class and had it log to see if
> > > the expected fixup happened. The log line comes by but the database
> > > gets filled with the double slashes anyhow. Is the database filled
> > > from another
> > class then the VO/Dao/DaoImpl combination?
> > >
> > >
> > > Many thanks,
> > >
> > > Daan

Reply via email to