Class WatchDog


  • public class WatchDog
    extends java.lang.Object
    Author:
    Kir
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.apache.log4j.Logger LOG
      Deprecated.
      static int SEC
      Deprecated.
    • Constructor Summary

      Constructors 
      Constructor Description
      WatchDog()
      Creates WatchDog that is not logging its events anywhere
      WatchDog​(java.lang.String name)
      Creates WatchDog that is logging its events into standard output
      WatchDog​(java.lang.String name, com.intellij.openapi.diagnostic.Logger ideaLogger, boolean useDebugLevel)
      Creates a logger which logs information in our typical Loggers, like Logger.SERVER or Logger.VCS
      WatchDog​(java.lang.String name, org.apache.log4j.Logger logger)
      Creates WatchDog that is logging its events into standard output if passed logger is null
      WatchDog​(java.lang.String name, org.apache.log4j.Logger logger, org.apache.log4j.Priority logLevel)
      Creates WatchDog that is logging its events into standard output if passed logger is null
      WatchDog​(java.lang.String name, org.apache.log4j.Logger logger, org.apache.log4j.Priority logLevel, boolean logIntoStdOutOnNullLogger)
      Deprecated.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String current()
      Get the time elapsed since start in seconds and milliseconds.
      static WatchDog debug​(com.intellij.openapi.diagnostic.Logger ideaLogger)  
      long getTimeMsecs()  
      long getTimeNanosec()  
      void reset()  
      void stop()
      Logs default stop message with time elapsed info and resets start time.
      void watch​(java.lang.String logMessage)  
      void watchAndReset​(java.lang.String logMessage)
      Logs message with time elapsed info and resets start time.
      • Methods inherited from class java.lang.Object

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

      • LOG

        @NonNls
        @Deprecated
        public static final org.apache.log4j.Logger LOG
        Deprecated.
    • Constructor Detail

      • WatchDog

        public WatchDog()
        Creates WatchDog that is not logging its events anywhere
      • WatchDog

        public WatchDog​(@Nullable
                        java.lang.String name)
        Creates WatchDog that is logging its events into standard output
      • WatchDog

        public WatchDog​(@Nullable
                        java.lang.String name,
                        org.apache.log4j.Logger logger)
        Creates WatchDog that is logging its events into standard output if passed logger is null
      • WatchDog

        public WatchDog​(@Nullable
                        java.lang.String name,
                        org.apache.log4j.Logger logger,
                        org.apache.log4j.Priority logLevel)
        Creates WatchDog that is logging its events into standard output if passed logger is null
      • WatchDog

        @Deprecated
        public WatchDog​(@Nullable
                        java.lang.String name,
                        org.apache.log4j.Logger logger,
                        org.apache.log4j.Priority logLevel,
                        boolean logIntoStdOutOnNullLogger)
        Deprecated.
      • WatchDog

        public WatchDog​(@Nullable
                        java.lang.String name,
                        com.intellij.openapi.diagnostic.Logger ideaLogger,
                        boolean useDebugLevel)
        Creates a logger which logs information in our typical Loggers, like Logger.SERVER or Logger.VCS
        Parameters:
        name - logger name
        ideaLogger - IdeaLogger for logging timing
        Since:
        10.0
    • Method Detail

      • debug

        @NotNull
        public static WatchDog debug​(@NotNull
                                     com.intellij.openapi.diagnostic.Logger ideaLogger)
      • watchAndReset

        public final void watchAndReset​(java.lang.String logMessage)
        Logs message with time elapsed info and resets start time.
      • watch

        public final void watch​(java.lang.String logMessage)
      • reset

        public void reset()
      • current

        @NotNull
        public java.lang.String current()
        Get the time elapsed since start in seconds and milliseconds.
      • stop

        public final void stop()
        Logs default stop message with time elapsed info and resets start time.
      • getTimeMsecs

        public long getTimeMsecs()
      • getTimeNanosec

        public long getTimeNanosec()