Package io.deephaven.logging
Class LogUtil
java.lang.Object
io.deephaven.logging.LogUtil
Utility class to help format logging messages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.fishlib.io.log.LogEntryappendDeltaTimeMillis(com.fishlib.io.log.LogEntry entry, long startMillis, long endMillis) Append a delta time expressed as fractional seconds to aLogEntry.static com.fishlib.io.log.LogEntryappendTimeMillis(com.fishlib.io.log.LogEntry entry, long millis) Append time expressed as fractional seconds to aLogEntry.static com.fishlib.io.logger.LoggersetupProcessUnsafeLogger(String logName, com.fishlib.configuration.Configuration conf) Create a logger usingcom.fishlib.logger.ProcessUnsafeLogCreatorand set it up as a standard logger for a process.static com.fishlib.io.logger.LoggersetupProcessUnsafeLogger(String logName, com.fishlib.configuration.Configuration conf, String logPath, int rollIntervalMs) Create a logger usingcom.fishlib.logger.ProcessUnsafeLogCreatorand set it up as a standard logger for a process.
-
Constructor Details
-
LogUtil
public LogUtil()
-
-
Method Details
-
setupProcessUnsafeLogger
public static com.fishlib.io.logger.Logger setupProcessUnsafeLogger(String logName, com.fishlib.configuration.Configuration conf) Create a logger usingcom.fishlib.logger.ProcessUnsafeLogCreatorand set it up as a standard logger for a process.- Parameters:
logName- the basename to use for the log file. A common choice is a program's main class simple name.conf- the configuration to use to set up the logger.- Returns:
- a
Loggerobject configured and ready to be used
-
setupProcessUnsafeLogger
public static com.fishlib.io.logger.Logger setupProcessUnsafeLogger(String logName, com.fishlib.configuration.Configuration conf, String logPath, int rollIntervalMs) Create a logger usingcom.fishlib.logger.ProcessUnsafeLogCreatorand set it up as a standard logger for a process.- Parameters:
logName- the basename to use for the log file. A common choice is a program's main class simple name.conf- the configuration to use to set up the loggerlogPath- the directory where to store the logsrollIntervalMs- the time period to use to roll the logs- Returns:
- a
Loggerobject configured and ready to be used
-
appendDeltaTimeMillis
public static com.fishlib.io.log.LogEntry appendDeltaTimeMillis(com.fishlib.io.log.LogEntry entry, long startMillis, long endMillis) Append a delta time expressed as fractional seconds to aLogEntry.- Parameters:
entry- TheLogEntrywhere to do the log appending.startMillis- The absolute time in milliseconds where the delta period to log starts.endMillis- The absolute time in milliseconds where the delta period to log ends.- Returns:
- the modified
LogEntryto support chaining of operations
-
appendTimeMillis
public static com.fishlib.io.log.LogEntry appendTimeMillis(com.fishlib.io.log.LogEntry entry, long millis) Append time expressed as fractional seconds to aLogEntry.- Parameters:
entry- TheLogEntrywhere to do the log appending.millis- Time to log in milliseconds.- Returns:
- the modified
LogEntryto support chaining of operations
-