net.sourceforge.tink.ant.TaskOutput Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tink-ant Show documentation
Show all versions of tink-ant Show documentation
Tink tag library for integrating to Apache Ant build system.
The newest version!
/**
* Copyright 2008,2009 Ivan SZKIBA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* under the License.
*/
package net.sourceforge.tink.ant;
import net.sourceforge.tink.model.Output;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
public class TaskOutput implements Output {
private final Task task;
public TaskOutput(Task task) {
super();
this.task = task;
}
@Override
public boolean isDebugEnabled() {
return true;
}
@Override
public boolean isErrorEnabled() {
return true;
}
@Override
public boolean isInfoEnabled() {
return true;
}
@Override
public boolean isVerboseEnabled() {
return true;
}
@Override
public boolean isWarningEnabled() {
return true;
}
@Override
public void debug(String message, Object... params) {
task.log(String.format(message, params), Project.MSG_DEBUG);
}
@Override
public void debug(Throwable cause, String message, Object... params) {
task.log(String.format(message, params), cause, Project.MSG_DEBUG);
}
@Override
public void error(String message, Object... params) {
task.log(String.format(message, params), Project.MSG_ERR);
}
@Override
public void error(Throwable cause, String message, Object... params) {
task.log(String.format(message, params), cause, Project.MSG_ERR);
}
@Override
public void info(String message, Object... params) {
task.log(String.format(message, params), Project.MSG_INFO);
}
@Override
public void info(Throwable cause, String message, Object... params) {
task.log(String.format(message, params), cause, Project.MSG_INFO);
}
@Override
public void verbose(String message, Object... params) {
task.log(String.format(message, params), Project.MSG_VERBOSE);
}
@Override
public void verbose(Throwable cause, String message, Object... params) {
task.log(String.format(message, params), cause, Project.MSG_VERBOSE);
}
@Override
public void warning(String message, Object... params) {
task.log(String.format(message, params), Project.MSG_WARN);
}
@Override
public void warning(Throwable cause, String message, Object... params) {
task.log(String.format(message, params), cause, Project.MSG_WARN);
}
}