db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DDLUTILS-168) DatabaseTaskBase should keep log4j configuration untouched
Date Tue, 10 Apr 2007 06:20:32 GMT

     [ https://issues.apache.org/jira/browse/DDLUTILS-168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Dudziak resolved DDLUTILS-168.
-------------------------------------

    Resolution: Won't Fix

The rationale is simple: Ant is not exactly user-friendly when it comes to logging. And requiring
the user to create/adapt a log4j configuration file so that he can see more output, is really
not user-friendly at all. Hence, we've added a simpler way to the Ant tasks themselves which
e.g. allows users to give more output in case of errors.
The problem now is that commons-logging has no way of configuring it via code. In fact, you
don't configure commons-logging at all, you configure the actual logging library that you
use, commons logging only provides an api so that you don't have to change the code regardless
of what the actual logging library is. This in turn means, that the Ant tasks have to configure
log4j directly (and no code uses log4j directly, all log calls refer to commons-logging).

That being said, there is two additional reasons why we won't change this:

* I would consider this a bug in JBoss (a class loading issue perhaps ?), and in fact I would
not be surprised if using commons-logging (if that were possible) would result in an even
nastier error.

* There should be no need to invoke the Ant tasks in code. They are more or less simple wrappers
around classes in the DdlUtils API, so instead of having to deal with Ant's API (which is
not exactly easy), it might actually be easier to use the core API instead.


> DatabaseTaskBase should keep log4j configuration untouched
> ----------------------------------------------------------
>
>                 Key: DDLUTILS-168
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-168
>             Project: DdlUtils
>          Issue Type: Improvement
>          Components: Ant Tasks
>         Environment: all
>            Reporter: Philippe de M. Sevestre
>         Assigned To: Thomas Dudziak
>            Priority: Minor
>
> DatabaseTaskBase should hava an option to keep log4j´s configuration untouched. In current
version, the implemented behaviour causes conflicts when running ant via its API from, say,
a jmx inside JBoss. 
> The symptom is the infamous log4j´s  message "ERROR: invalid console appender config
detected, console stream is looping".
> In my private copy of ddlutils, I´ve implemented a workaround by surrounding most of
 the code inside the function initLogging() with an "if (  a sensible system property not
found ) {  do log4j stuff }".
> Actually, I don´t know why is this code there, anyway... The comment in the code say
that you´re forcing console output, but makes no mention about the reasoning behind this
decision.
> Should´t log be simply delegated to commons-logging ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message