Class EclipseLogger

  • All Implemented Interfaces:
    ILogger

    public class EclipseLogger
    extends java.lang.Object
    implements ILogger
    ILogger implementation for eclipse logger.
    Author:
    Sass
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.eclipse.core.runtime.ILog logger  
    • Constructor Summary

      Constructors 
      Constructor Description
      EclipseLogger​(org.eclipse.core.runtime.Plugin plugin)
      Constructor to initialize the instance of the logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.String msg, java.lang.Class<?> clazz, java.lang.String bundleName)
      Log an DEBUG message.
      void error​(java.lang.String msg, java.lang.Class<?> clazz, java.lang.String bundleName)
      Log an ERROR message.
      void exception​(java.lang.String msg, java.lang.Class<?> clazz, java.lang.String bundleName)
      Log an EXCEPTION message.
      void info​(java.lang.String msg, java.lang.Class<?> clazz, java.lang.String bundleName)
      Log an INFO message.
      void warn​(java.lang.String msg, java.lang.Class<?> clazz, java.lang.String bundleName)
      Log an WARN message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private org.eclipse.core.runtime.ILog logger
    • Constructor Detail

      • EclipseLogger

        public EclipseLogger​(org.eclipse.core.runtime.Plugin plugin)
        Constructor to initialize the instance of the logger.
        Parameters:
        plugin - The Plugin from which the logger is called.
    • Method Detail

      • info

        public void info​(java.lang.String msg,
                         java.lang.Class<?> clazz,
                         java.lang.String bundleName)
        Log an INFO message.

        If the logger is currently enabled for the INFO message level then the given message is forwarded to all the registered output Handler objects.

        Specified by:
        info in interface ILogger
        Parameters:
        msg - The string message (or a key in the message catalog)
        clazz - The class where the message was created
        bundleName - Name of the bundle where the message was created
      • error

        public void error​(java.lang.String msg,
                          java.lang.Class<?> clazz,
                          java.lang.String bundleName)
        Log an ERROR message.

        If the logger is currently enabled for the ERROR message level then the given message is forwarded to all the registered output Handler objects.

        Specified by:
        error in interface ILogger
        Parameters:
        msg - The string message (or a key in the message catalog)
        clazz - The class where the message was created
        bundleName - Name of the bundle where the message was created
      • warn

        public void warn​(java.lang.String msg,
                         java.lang.Class<?> clazz,
                         java.lang.String bundleName)
        Log an WARN message.

        If the logger is currently enabled for the WARN message level then the given message is forwarded to all the registered output Handler objects.

        Specified by:
        warn in interface ILogger
        Parameters:
        msg - The string message (or a key in the message catalog)
        clazz - The class where the message was created
        bundleName - Name of the bundle where the message was created
      • debug

        public void debug​(java.lang.String msg,
                          java.lang.Class<?> clazz,
                          java.lang.String bundleName)
        Log an DEBUG message.

        If the logger is currently enabled for the DEBUG message level then the given message is forwarded to all the registered output Handler objects.

        Specified by:
        debug in interface ILogger
        Parameters:
        msg - The string message (or a key in the message catalog)
        clazz - The class where the message was created
        bundleName - Name of the bundle where the message was created
      • exception

        public void exception​(java.lang.String msg,
                              java.lang.Class<?> clazz,
                              java.lang.String bundleName)
        Log an EXCEPTION message.

        If the logger is currently enabled for the EXCEPTION message level then the given message is forwarded to all the registered output Handler objects.

        Specified by:
        exception in interface ILogger
        Parameters:
        msg - The string message (or a key in the message catalog)
        clazz - The class where the message was created
        bundleName - Name of the bundle where the message was created