Package jetbrains.buildServer.util
Class WatchDog
- java.lang.Object
-
- jetbrains.buildServer.util.WatchDog
-
public class WatchDog extends Object
- Author:
- Kir
-
-
Constructor Summary
Constructors Constructor Description WatchDog()
Creates WatchDog that is not logging its events anywhereWatchDog(String name)
Creates WatchDog that is logging its events into standard outputWatchDog(String name, Logger ideaLogger, boolean useDebugLevel)
Creates a logger which logs information in our typical Loggers, like Logger.SERVER or Logger.VCSWatchDog(String name, org.apache.log4j.Logger logger)
Creates WatchDog that is logging its events into standard output if passed logger is nullWatchDog(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 nullWatchDog(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 String
current()
Get the time elapsed since start in seconds and milliseconds.static WatchDog
debug(Logger ideaLogger)
long
getTimeMsecs()
long
getTimeNanosec()
void
reset()
void
stop()
Logs default stop message with time elapsed info and resets start time.void
watch(String logMessage)
void
watchAndReset(String logMessage)
Logs message with time elapsed info and resets start time.
-
-
-
Field Detail
-
LOG
@NonNls @Deprecated public static final org.apache.log4j.Logger LOG
Deprecated.
-
SEC
@Deprecated public static final int SEC
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WatchDog
public WatchDog()
Creates WatchDog that is not logging its events anywhere
-
WatchDog
public WatchDog(@Nullable String name)
Creates WatchDog that is logging its events into standard output
-
WatchDog
public WatchDog(@Nullable 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 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 String name, org.apache.log4j.Logger logger, org.apache.log4j.Priority logLevel, boolean logIntoStdOutOnNullLogger)
Deprecated.
-
-
Method Detail
-
watchAndReset
public final void watchAndReset(String logMessage)
Logs message with time elapsed info and resets start time.
-
watch
public final void watch(String logMessage)
-
reset
public void reset()
-
current
@NotNull public 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()
-
-