Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

MyBatis Generator Maven Plugin should log to Maven log #711

Open
GoogleCodeExporter opened this issue Apr 21, 2015 · 3 comments
Open

MyBatis Generator Maven Plugin should log to Maven log #711

GoogleCodeExporter opened this issue Apr 21, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What version of the MyBatis are you using?
mybatis-generator-maven-plugin:1.3.2

Please describe the problem.  Unit tests are best!
When run from Maven, DatabaseIntrospector initializes its log, causing a 
warning message to printed to the console.

What is the expected output? What do you see instead?
Log messages should be directed to Maven.  Instead they try to go to log4j.

Can you provide stack trace, logs, error messages that are displayed?
log4j:WARN No appenders could be found for logger 
(org.mybatis.generator.internal.db.DatabaseIntrospector).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
info.


Please provide any additional information below.
Proposed fix attached.  This patch calls LogFactory.setLogFactory from the 
Mojo, redirecting MBG log messages to the Maven log.

Original issue reported on code.google.com by paulkrau...@alum.mit.edu on 2 Nov 2012 at 12:17

Attachments:

@GoogleCodeExporter
Copy link
Author

For backwards compatibility with JDK 1.5, the @Overrides annotations in the 
MavenLogFactory and MavenLogImpl classes should be removed.  
Sorry about that.

Original comment by paulkrau...@alum.mit.edu on 2 Nov 2012 at 12:39

@GoogleCodeExporter
Copy link
Author

I'm not sure why this issue hasn't merited a response.  If the patch is 
wrong-headed, please say why.  Perhaps it was just too difficult to apply.  I'm 
attaching a new one, without @Override annotations, and rooted at the project 
level.

Original comment by paulkrau...@alum.mit.edu on 13 Feb 2013 at 10:16

Attachments:

@GoogleCodeExporter
Copy link
Author

I'll get to it.  Just been crazy busy.  Also, we're moving to github so I won't 
apply this until the move is complete.

It's open source man - we're all volunteers!

Original comment by jeffgbut...@gmail.com on 13 Feb 2013 at 10:19

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant