Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.core.util
Class Log

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.common.core.util.Log

public class Log
extends java.lang.Object

A utility for logging errors, warnings, and information. Provides a simple interface for generating logs based on status objects.


Constructor Summary
protected Log ()
          private constructor for the static class.
 
Method Summary
static void error ( Plugin plugin, int code, java.lang.String message)
          Generates an error log for the specified plug-in, with the specified status code and message.
static void error ( Plugin plugin, int code, java.lang.String message, java.lang.Throwable throwable)
          Generates an error log for the specified plug-in, with the specified status code, message, and throwable.
protected static  ILog getDefault ()
          Retrieves the default log listener for this log utility.
static void info ( Plugin plugin, int code, java.lang.String message)
          Generates an information log for the specified plug-in, with the specified status code and message.
static void info ( Plugin plugin, int code, java.lang.String message, java.lang.Throwable throwable)
          Generates an information log for the specified plug-in, with the specified status code, message, and throwable.
static void log ( Plugin plugin, int severity, int code, java.lang.String message)
          Generates a log for the specified plug-in, with the specified severity, status code, and message.
static void log ( Plugin plugin, int severity, int code, java.lang.String message, java.lang.Throwable throwable)
          Generates a log for the specified plug-in, with the specified severity, status code, message, and throwable.
static void log ( Plugin plugin, IStatus status)
          Responds to a log request for the specified plug-in based on the specified status object.
static void warning ( Plugin plugin, int code, java.lang.String message)
          Generates a warning log for the specified plug-in, with the specified status code and message.
static void warning ( Plugin plugin, int code, java.lang.String message, java.lang.Throwable throwable)
          Generates a warning log for the specified plug-in, with the specified status code, message, and throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

protected Log()
private constructor for the static class.

Method Detail

getDefault

protected static 
ILog getDefault()
Retrieves the default log listener for this log utility.

Returns:
The default log listener for this log utility.

log

public static void log(
Plugin plugin,
                       
IStatus status)
Responds to a log request for the specified plug-in based on the specified status object. Statuses with severity of error or warning result in the generation of a platform log for the specified plug-in; all log requests are forward to the default log listener.

Parameters:
plugin - The plug-in for which to generate a log.
status - The status object on which to base the log.

log

public static void log(
Plugin plugin,
                       int severity,
                       int code,
                       java.lang.String message)
Generates a log for the specified plug-in, with the specified severity, status code, and message.

Parameters:
plugin - The plug-in for which to generate a log.
severity - The severity of the log.
code - The status code for the log.
message - The message for the log.

log

public static void log(
Plugin plugin,
                       int severity,
                       int code,
                       java.lang.String message,
                       java.lang.Throwable throwable)
Generates a log for the specified plug-in, with the specified severity, status code, message, and throwable.

Parameters:
plugin - The plug-in for which to generate a log.
severity - The severity of the log.
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

error

public static void error(
Plugin plugin,
                         int code,
                         java.lang.String message)
Generates an error log for the specified plug-in, with the specified status code and message.

Parameters:
plugin - The plug-in for which to generate a log.
code - The status code for the log.
message - The message for the log.

error

public static void error(
Plugin plugin,
                         int code,
                         java.lang.String message,
                         java.lang.Throwable throwable)
Generates an error log for the specified plug-in, with the specified status code, message, and throwable.

Parameters:
plugin - The plug-in for which to generate a log.
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

warning

public static void warning(
Plugin plugin,
                           int code,
                           java.lang.String message)
Generates a warning log for the specified plug-in, with the specified status code and message.

Parameters:
plugin - The plug-in for which to generate a log.
code - The status code for the log.
message - The message for the log.

warning

public static void warning(
Plugin plugin,
                           int code,
                           java.lang.String message,
                           java.lang.Throwable throwable)
Generates a warning log for the specified plug-in, with the specified status code, message, and throwable.

Parameters:
plugin - The plug-in for which to generate a log.
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

info

public static void info(
Plugin plugin,
                        int code,
                        java.lang.String message)
Generates an information log for the specified plug-in, with the specified status code and message.

Parameters:
plugin - The plug-in for which to generate a log.
code - The status code for the log.
message - The message for the log.

info

public static void info(
Plugin plugin,
                        int code,
                        java.lang.String message,
                        java.lang.Throwable throwable)
Generates an information log for the specified plug-in, with the specified status code, message, and throwable.

Parameters:
plugin - The plug-in for which to generate a log.
code - The status code for the log.
message - The message for the log.
throwable - The throwable for the log.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire