-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
src/main/java/com/github/wvengen/maven/proguard/MavenloggingBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.github.wvengen.maven.proguard; | ||
|
||
import org.apache.maven.plugin.logging.Log; | ||
import org.apache.tools.ant.DefaultLogger; | ||
import org.apache.tools.ant.Project; | ||
|
||
import java.io.PrintStream; | ||
|
||
public class MavenloggingBinder extends DefaultLogger { | ||
|
||
private final Log log; | ||
|
||
public MavenloggingBinder(Log log) { | ||
this.log = log; | ||
} | ||
|
||
@Override | ||
public void setOutputPrintStream(PrintStream output) { | ||
|
||
} | ||
|
||
@Override | ||
public void setErrorPrintStream(PrintStream err) { | ||
|
||
} | ||
|
||
@Override | ||
protected void printMessage(String message, PrintStream stream, int priority) { | ||
switch (priority) { | ||
case Project.MSG_ERR: { | ||
log.error(message); | ||
break; | ||
} | ||
case Project.MSG_VERBOSE: | ||
case Project.MSG_DEBUG: { | ||
log.debug(message); | ||
break; | ||
} | ||
case Project.MSG_WARN: { | ||
log.warn(message); | ||
break; | ||
} | ||
default: { | ||
log.info(message); | ||
break; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters