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.sling.ide.eclipse.core.debug;
 
 import  org.eclipse.osgi.util.NLS;

The PluginLogger is a simple helper class which assists with logging from Eclipse plugins
 
 public interface PluginLogger {

    
Logs an error message using the platform log facility

Parameters:
message message to log
 
     void error(String message);

    
Logs an error message using the platform log facility

Parameters:
message message to log
cause the cause
 
     void error(String messageThrowable cause);

    
Logs a warning message using the platform log facility

Parameters:
message message to log
 
     void warn(String message);

    
Logs an warning message using the platform log facility

Parameters:
message message to log
cause the cause
 
     void warn(String messageThrowable cause);

    
Sends a trace message using the platform debug facility

By default these trace messages are ignored, and are only logged if debugging is enabled for a specific plug-in.

Usage guide:

 logger.trace("Joining {0} with {1}", a, b);
 a.join(b);
 

Parameters:
message A message, using the syntax from NLS.bind(String, Object[])
arguments an optional array of arguments
See also:
How do I use the platform debug tracing facility?
 
     void trace(String messageObject... arguments);

    
Sends a trace message using the platform debug facility

By default these trace messages are ignored, and are only logged if debugging is enabled for a specific plug-in.

Usage guide:

 try {
     // code here
 } catch (RuntimeException e) {
     logger.trace("An unexpected error has occured", e);
 }
 

Parameters:
message A string message
error the error that occured
See also:
How do I use the platform debug tracing facility?
    void trace(String messageThrowable error);
New to GrepCode? Check out our FAQ X