Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed to the Apache Software Foundation (ASF) under one
   * or more contributor license agreements.  See the NOTICE file
   * distributed with this work for additional information
   * regarding copyright ownership.  The ASF licenses this file
   * to you 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.
  */
 package org.apache.ode.tools;


A context for the execution of a Command that supplies uniform logging and output functionality.

The logging infrastructure is purposefully simpler than, e.g., Log4J, in the interest of supporting Apache Ant and other environments.

 
 public interface CommandContext {

  
Send a line of output to the equivalent of standard out.

Parameters:
s the content to send.
 
   public void outln(String s);

  
Send output to the equivalent of standard out. Note that this is not required to be pretty if it's not on a console, i.e., multiple invocations might not appear on a single line.

Parameters:
s the content to send.
 
   public void out(String s);
  
  
Send a line of output to the equivalent of standard error.

Parameters:
s the content to send.
 
   public void errln(String s);
  
  
Log an error.

Parameters:
s a descriptive message.
 
   public void error(String s);

  
Log an error that resulted from a java.lang.Throwable.

Parameters:
s a descriptive message.
t the cause.
 
   public void error(String sThrowable t);

  
Log a warning that resulted from a java.lang.Throwable

Parameters:
s
t
 
   public void warn(String sThrowable t);

  
Log a warning.

Parameters:
s a descriptive message.
 
   public void warn(String s);

  
Log an informative message.

Parameters:
s a descriptive message.
 
   public void info(String s);

  
Log an informative message that resulted from a java.lang.Throwable.

Parameters:
s a descriptive message.
t the cause.
 
   public void info(String sThrowable t);

  
Log a debug-level message that resulted from a java.lang.Throwable.

Parameters:
s a descriptive message.
t the cause.
 
 
   public void debug(String sThrowable t);

  
Log an debug-level message.

Parameters:
s a descriptive message.
  public void debug(String s);
  
New to GrepCode? Check out our FAQ X