本文整理了Java中org.apache.maven.plugin.Mojo.getLog()
方法的一些代码示例,展示了Mojo.getLog()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mojo.getLog()
方法的具体详情如下:
包路径:org.apache.maven.plugin.Mojo
类名称:Mojo
方法名:getLog
[英]Furnish access to the standard Maven logging mechanism which is managed in this base class.
[中]提供对此基类中管理的标准Maven日志机制的访问。
代码示例来源:origin: apache/storm
public int run(List<String> command, List<String> output) {
int retCode = 1;
ProcessBuilder pb = new ProcessBuilder(command);
try {
Process p = pb.start();
OutputBufferThread stdOut = new OutputBufferThread(p.getInputStream());
OutputBufferThread stdErr = new OutputBufferThread(p.getErrorStream());
stdOut.start();
stdErr.start();
retCode = p.waitFor();
if (retCode != 0) {
mojo.getLog().warn(command + " failed with error code " + retCode);
for (String s : stdErr.getOutput()) {
mojo.getLog().debug(s);
}
}
stdOut.join();
stdErr.join();
output.addAll(stdOut.getOutput());
} catch (Exception ex) {
mojo.getLog().warn(command + " failed: " + ex.toString());
}
return retCode;
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void debug(String msg) {
if (verbose) {
mojo.getLog().debug(msg);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void debug(String msg, Throwable t) {
if (verbose) {
mojo.getLog().debug(msg, t);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void error(String msg) {
if (verbose) {
mojo.getLog().error(msg);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void error(String msg, Throwable t) {
if (verbose) {
mojo.getLog().error(msg, t);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void info(String msg) {
if (verbose) {
mojo.getLog().info(msg);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void warn(String msg, Throwable t) {
if (verbose) {
mojo.getLog().warn(msg, t);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void info(String msg, Throwable t) {
if (verbose) {
mojo.getLog().info(msg, t);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public void warn(String msg) {
if (verbose) {
mojo.getLog().warn(msg);
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public boolean isInfoEnabled() {
return mojo.getLog().isInfoEnabled();
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public boolean isDebugEnabled() {
return mojo.getLog().isDebugEnabled();
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public boolean isWarnEnabled() {
return mojo.getLog().isWarnEnabled();
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
@Override
public boolean isErrorEnabled() {
return mojo.getLog().isErrorEnabled();
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
private void error(FormattingTuple tuple) {
if (null == tuple.getThrowable()) {
mojo.getLog().error(tuple.getMessage());
} else {
mojo.getLog().error(tuple.getMessage(), tuple.getThrowable());
}
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
private void info(FormattingTuple tuple) {
if (null == tuple.getThrowable()) {
mojo.getLog().info(tuple.getMessage());
} else {
mojo.getLog().info(tuple.getMessage(), tuple.getThrowable());
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
private void debug(FormattingTuple tuple) {
if (null == tuple.getThrowable()) {
mojo.getLog().debug(tuple.getMessage());
} else {
mojo.getLog().debug(tuple.getMessage(), tuple.getThrowable());
}
}
代码示例来源:origin: git-commit-id/maven-git-commit-id-plugin
private void warn(FormattingTuple tuple) {
if (null == tuple.getThrowable()) {
mojo.getLog().warn(tuple.getMessage());
} else {
mojo.getLog().warn(tuple.getMessage(), tuple.getThrowable());
}
}
代码示例来源:origin: pl.project13.maven/git-commit-id-plugin
@Override
public void info(String msg) {
if (verbose) {
mojo.getLog().info(msg);
}
}
代码示例来源:origin: org.apache.geronimo.genesis.plugins/plugin-support
private org.apache.maven.plugin.logging.Log getLog() {
if (mojo == null) {
throw new RuntimeException("Mojo not set; can not delegate logging");
}
return mojo.getLog();
}
代码示例来源:origin: pl.project13.maven/git-commit-id-plugin
private void warn(FormattingTuple tuple) {
if (null == tuple.getThrowable()) {
mojo.getLog().warn(tuple.getMessage());
} else {
mojo.getLog().warn(tuple.getMessage(), tuple.getThrowable());
}
}
内容来源于网络,如有侵权,请联系作者删除!