You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Ben Munat (JIRA)" <ib...@incubator.apache.org> on 2006/06/12 18:49:29 UTC

[jira] Created: (IBATIS-305) Cannot get log output for com.ibatis classes

Cannot get log output for com.ibatis classes
--------------------------------------------

         Key: IBATIS-305
         URL: http://issues.apache.org/jira/browse/IBATIS-305
     Project: iBatis for Java
        Type: Bug

 Environment: tomcat 5.5.* on windows
    Reporter: Ben Munat
    Priority: Minor


After a conversation on the mailing list, I noticed that I don't get any log statements for com.ibatis classes and don't remember ever seeing such on several projects.

I have a log4j.properties file like this:

log4j.rootLogger=INFO, stdout
log4j.logger.com.ibatis=DEBUG
log4j.logger.java.sql=DEBUG
#... etc.

And I have the commons-logging.jar in the WEB-INF/lib of my build. I discovered that I also had a commons-logging in tomcat's common/lib. Removing that got rid of a double-logging problem that I had wondered about for a while, but I still don't see any com.ibatis log output. 

This isn't too big an issue for me, because I'm mostly interested in the sql queries and I get those just fine having the java.sql logger. It is strange, however, not to be able to get ibatis log output at all.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-305) Cannot get log output for com.ibatis classes

Posted by "Jeff Butler (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-305?page=comments#action_12417528 ] 

Jeff Butler commented on IBATIS-305:
------------------------------------

We are open to adding more logging statements to iBATIS.  If you have some good suggestions, then I think the best thing to do would be to open a new JIRA issue and we could use it as a catch all for new logging suggestions.

I've done a fair amount of testing the logs and I'm seeing everything that should come out - so I think it's working "as designed" right now.  But I also just noticed that that cache logging statements were added relatively recently (last March) and are not in the latest released version of iBATIS.

If you find somewhere that a log statement is not coming out, and should be, then feel free to reopen this bug or create a new one.


> Cannot get log output for com.ibatis classes
> --------------------------------------------
>
>          Key: IBATIS-305
>          URL: http://issues.apache.org/jira/browse/IBATIS-305
>      Project: iBatis for Java
>         Type: Bug

>  Environment: tomcat 5.5.* on windows
>     Reporter: Ben Munat
>     Assignee: Jeff Butler
>     Priority: Minor
>      Fix For: 2.2.0

>
> After a conversation on the mailing list, I noticed that I don't get any log statements for com.ibatis classes and don't remember ever seeing such on several projects.
> I have a log4j.properties file like this:
> log4j.rootLogger=INFO, stdout
> log4j.logger.com.ibatis=DEBUG
> log4j.logger.java.sql=DEBUG
> #... etc.
> And I have the commons-logging.jar in the WEB-INF/lib of my build. I discovered that I also had a commons-logging in tomcat's common/lib. Removing that got rid of a double-logging problem that I had wondered about for a while, but I still don't see any com.ibatis log output. 
> This isn't too big an issue for me, because I'm mostly interested in the sql queries and I get those just fine having the java.sql logger. It is strange, however, not to be able to get ibatis log output at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-305) Cannot get log output for com.ibatis classes

Posted by "Jeff Butler (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-305?page=comments#action_12415881 ] 

Jeff Butler commented on IBATIS-305:
------------------------------------

I do think we need to add some information to the documentation about logging.

Just to verify, you are seeing log statements on the "java.sql" classes, but not on the "com.ibatis" classes - right?

In truth, iBATIS does very little logging with the "com.ibatis" classes.  Most of the interesting log statements from iBATIS will be in the "java.sql" classes.  Maybe what you are seeing is the normal output from iBATIS logging.  A good test would be to enable caching on some statement and see if there are log statements from "com.ibatis".  Caching is one of the very few places where iBATIS does log to the "com.ibatis" classes.


> Cannot get log output for com.ibatis classes
> --------------------------------------------
>
>          Key: IBATIS-305
>          URL: http://issues.apache.org/jira/browse/IBATIS-305
>      Project: iBatis for Java
>         Type: Bug

>  Environment: tomcat 5.5.* on windows
>     Reporter: Ben Munat
>     Priority: Minor

>
> After a conversation on the mailing list, I noticed that I don't get any log statements for com.ibatis classes and don't remember ever seeing such on several projects.
> I have a log4j.properties file like this:
> log4j.rootLogger=INFO, stdout
> log4j.logger.com.ibatis=DEBUG
> log4j.logger.java.sql=DEBUG
> #... etc.
> And I have the commons-logging.jar in the WEB-INF/lib of my build. I discovered that I also had a commons-logging in tomcat's common/lib. Removing that got rid of a double-logging problem that I had wondered about for a while, but I still don't see any com.ibatis log output. 
> This isn't too big an issue for me, because I'm mostly interested in the sql queries and I get those just fine having the java.sql logger. It is strange, however, not to be able to get ibatis log output at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-305) Cannot get log output for com.ibatis classes

Posted by "Jeff Butler (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-305?page=all ]
     
Jeff Butler closed IBATIS-305:
------------------------------

    Fix Version: 2.2.0
     Resolution: Fixed

I corrected and expanded the documentation to reflect how iBATIS actually uses logging (for example, iBATIS is no longer dependant on Jakarta Commons Logging).  I also added two methods to the LogFactory class that can be used to select specific log implementations if you want to override the default search order.

> Cannot get log output for com.ibatis classes
> --------------------------------------------
>
>          Key: IBATIS-305
>          URL: http://issues.apache.org/jira/browse/IBATIS-305
>      Project: iBatis for Java
>         Type: Bug

>  Environment: tomcat 5.5.* on windows
>     Reporter: Ben Munat
>     Assignee: Jeff Butler
>     Priority: Minor
>      Fix For: 2.2.0

>
> After a conversation on the mailing list, I noticed that I don't get any log statements for com.ibatis classes and don't remember ever seeing such on several projects.
> I have a log4j.properties file like this:
> log4j.rootLogger=INFO, stdout
> log4j.logger.com.ibatis=DEBUG
> log4j.logger.java.sql=DEBUG
> #... etc.
> And I have the commons-logging.jar in the WEB-INF/lib of my build. I discovered that I also had a commons-logging in tomcat's common/lib. Removing that got rid of a double-logging problem that I had wondered about for a while, but I still don't see any com.ibatis log output. 
> This isn't too big an issue for me, because I'm mostly interested in the sql queries and I get those just fine having the java.sql logger. It is strange, however, not to be able to get ibatis log output at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-305) Cannot get log output for com.ibatis classes

Posted by "Ben Munat (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-305?page=comments#action_12417522 ] 

Ben Munat commented on IBATIS-305:
----------------------------------

Yes, I am seeing java.sql log output but no com.ibatis at all... ever. I will look into the caching test when I have time... however, I'm almost positive that there has been at least some ibatis caching in use on most of the projects using ibatis that I've worked on, and I don't recall ever seeing any ibatis output. I also think that's exactly the issue (no log ouput for caching) the person that brought this up on the list was having.

I understand and agree that most of the useful information is coming from the java.sql logging. I hadn't actually ever noticed not having ibatis logging until someone else brought it up on the list. I didn't think it was too important an issue, but now that I've opened this can of worms, my co-worker and I were just talking yesterday about how nice it would be if ibatis, in debug mode, printed the name of the map and the file it is in before running every query. The only time you ever get that information is when something blows up. But, sometimes it's not blowing up and you just want to find the map that's running the query. I usually select a chunk of sql from the java.sql debug output and search for that string in my maps.

Anyway, that's probably a separate bug after we figure out this one. Will try to test stuff with caching asap... (or I'll looking through the ibatis source for places where some log output should be coming out).

> Cannot get log output for com.ibatis classes
> --------------------------------------------
>
>          Key: IBATIS-305
>          URL: http://issues.apache.org/jira/browse/IBATIS-305
>      Project: iBatis for Java
>         Type: Bug

>  Environment: tomcat 5.5.* on windows
>     Reporter: Ben Munat
>     Assignee: Jeff Butler
>     Priority: Minor
>      Fix For: 2.2.0

>
> After a conversation on the mailing list, I noticed that I don't get any log statements for com.ibatis classes and don't remember ever seeing such on several projects.
> I have a log4j.properties file like this:
> log4j.rootLogger=INFO, stdout
> log4j.logger.com.ibatis=DEBUG
> log4j.logger.java.sql=DEBUG
> #... etc.
> And I have the commons-logging.jar in the WEB-INF/lib of my build. I discovered that I also had a commons-logging in tomcat's common/lib. Removing that got rid of a double-logging problem that I had wondered about for a while, but I still don't see any com.ibatis log output. 
> This isn't too big an issue for me, because I'm mostly interested in the sql queries and I get those just fine having the java.sql logger. It is strange, however, not to be able to get ibatis log output at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira