You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Steve Garcia <SG...@qrs.com> on 2003/10/17 04:06:14 UTC
log4j
When I invoke the "build-torque.xml sql" ant task from one build file via
the Ant tag, Log4J claims it cannot find the org.apache.torque.engine
appender (but the build is sucessful)
<ant antfile="build-torque.xml" dir="${torque.home}" target="sql"
inheritall="false" inheritrefs="false" >
sql-template:
[echo] loading templates from templates
[torque-sql] Using contextProperties file:
C:\source\itm\main\runtime\torque.prope
rties
[torque-sql] Generating to file
C:\source\itm\main\build\database\sql\report.itm.s
ql.generation
[torque-sql] log4j:ERROR Could not find value for key
log4j.appender.org.apache.to
rque.engine
[torque-sql] log4j:ERROR Could not instantiate appender named
"org.apache.torque.e
ngine".
[torque-sql] 2003-10-16 18:57:38,982 [main] INFO
org.apache.torque.engine.databas
e.transform.XmlToAppData - Parsing file: 'itm-schema.xml'
[torque-sql] 2003-10-16 18:57:39,013 [main] INFO
org.apache.torque.engine.databas
e.transform.DTDResolver - Resolver: used database.dtd from
'org.apache.torque.engi
ne.database.transform' package
BUILD SUCCESSFUL
Total time: 4 seconds
C:\source\itm\main>
When I do the exact same thing but instead use the Ant exec tag, log4j loads
properly and I get debug ouput like
<exec executable="ant.bat" dir="${torque.home}" >
<arg value="-f"/>
<arg value="build-torque.xml" />
<arg value="sql" />
[exec] sql-template:
[exec] [echo] loading templates from templates
[exec] [torque-sql] Using contextProperties file:
C:\source\itm\main\runtime\
torque.properties
[exec] [torque-sql] Generating to file
C:\source\itm\main\build\database\sql\
report.itm.sql.generation
[exec] [torque-sql] [INFO] XmlToAppData - -Parsing file:
'itm-schema.xml'
[exec] [torque-sql] [INFO] DTDResolver - -Resolver: used database.dtd
from 'o
rg.apache.torque.engine.database.transform' package
[exec] [torque-sql] [DEBUG] XmlToAppData - -endElement(, , column)
called
[exec] [torque-sql] [DEBUG] XmlToAppData - -endElement(, , column)
called
[exec] [torque-sql] [DEBUG] XmlToAppData - -endElement(, , table)
called
I would like to use the ant call, but I also want the debug output that I
get from the exec call. Can someone help me with this? It would be
appreciated.
Thanks, Steve
Re: log4j
Posted by TP R Murthy <r....@ceruleaninfotech.com>.
Hi,
suggest you create a log4j.properties file (with ConsoleAppender) and
place it in the torque-gen dir. That should take care of the problem.
build will be successful even if there is no log4j configuration.
regards,
On Thu, 16 Oct 2003, Steve Garcia wrote:
> When I invoke the "build-torque.xml sql" ant task from one build file via
> the Ant tag, Log4J claims it cannot find the org.apache.torque.engine
> appender (but the build is sucessful)
>
> <ant antfile="build-torque.xml" dir="${torque.home}" target="sql"
> inheritall="false" inheritrefs="false" >
>
> sql-template:
> [echo] loading templates from templates
> [torque-sql] Using contextProperties file:
> C:\source\itm\main\runtime\torque.prope
> rties
> [torque-sql] Generating to file
> C:\source\itm\main\build\database\sql\report.itm.s
> ql.generation
> [torque-sql] log4j:ERROR Could not find value for key
> log4j.appender.org.apache.to
> rque.engine
> [torque-sql] log4j:ERROR Could not instantiate appender named
> "org.apache.torque.e
> ngine".
> [torque-sql] 2003-10-16 18:57:38,982 [main] INFO
> org.apache.torque.engine.databas
> e.transform.XmlToAppData - Parsing file: 'itm-schema.xml'
> [torque-sql] 2003-10-16 18:57:39,013 [main] INFO
> org.apache.torque.engine.databas
> e.transform.DTDResolver - Resolver: used database.dtd from
> 'org.apache.torque.engi
> ne.database.transform' package
>
> BUILD SUCCESSFUL
> Total time: 4 seconds
> C:\source\itm\main>
>
>
>
> When I do the exact same thing but instead use the Ant exec tag, log4j loads
> properly and I get debug ouput like
>
> <exec executable="ant.bat" dir="${torque.home}" >
> <arg value="-f"/>
> <arg value="build-torque.xml" />
> <arg value="sql" />
>
> [exec] sql-template:
> [exec] [echo] loading templates from templates
> [exec] [torque-sql] Using contextProperties file:
> C:\source\itm\main\runtime\
> torque.properties
> [exec] [torque-sql] Generating to file
> C:\source\itm\main\build\database\sql\
> report.itm.sql.generation
> [exec] [torque-sql] [INFO] XmlToAppData - -Parsing file:
> 'itm-schema.xml'
> [exec] [torque-sql] [INFO] DTDResolver - -Resolver: used database.dtd
> from 'o
> rg.apache.torque.engine.database.transform' package
> [exec] [torque-sql] [DEBUG] XmlToAppData - -endElement(, , column)
> called
> [exec] [torque-sql] [DEBUG] XmlToAppData - -endElement(, , column)
> called
> [exec] [torque-sql] [DEBUG] XmlToAppData - -endElement(, , table)
> called
>
> I would like to use the ant call, but I also want the debug output that I
> get from the exec call. Can someone help me with this? It would be
> appreciated.
>
> Thanks, Steve
>
--
_________________________________________________________________
TP R Murthy (Systems Analyst)
Cerulean Information Technology Pvt. Ltd.
#24, floor#2, 5th Main, 5th Block, Koramangala, Bangalore-560 095.
Phone: 299-1886, 299-1897
Mobile: 98451 14346
web:http://www.ceruleaninfotech.com
_________________________________________________________________
"We can easily forgive a child who is afraid of the dark.
The real tragedy of life is when men are
afraid of the light."
-- Plato
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org