Class Log


  • public class Log
    extends java.lang.Object
    Static wrapper around native and crt logging. It is NOT safe to change the logging setup after it has been initialized.
    • Constructor Detail

      • Log

        public Log()
    • Method Detail

      • log

        public static void log​(Log.LogLevel level,
                               Log.LogSubject subject,
                               java.lang.String message)
        Logs a message at the specified log level.
        Parameters:
        level - (for filtering purposes) level attached to the log invocation
        subject - (for filtering purposes) log subject
        message - log string to write
      • initLoggingFromSystemProperties

        public static void initLoggingFromSystemProperties()
                                                    throws java.lang.IllegalArgumentException
        Examines logging-related system properties and initializes the logging system if they have been properly set.
        Throws:
        java.lang.IllegalArgumentException
      • initLoggingToStdout

        public static void initLoggingToStdout​(Log.LogLevel level)
        Initializes logging to go to stdout
        Parameters:
        level - the filter level to apply to log calls
      • initLoggingToStderr

        public static void initLoggingToStderr​(Log.LogLevel level)
        Initializes logging to go to stderr
        Parameters:
        level - the filter level to apply to log calls
      • initLoggingToFile

        public static void initLoggingToFile​(Log.LogLevel level,
                                             java.lang.String filename)
        Initializes logging to go to a file
        Parameters:
        level - the filter level to apply to log calls
        filename - name of the file to direct logging to