Class LoggingSystemEnvironment

java.lang.Object
org.glassfish.main.jul.env.LoggingSystemEnvironment

public final class LoggingSystemEnvironment extends Object
This class holds informations detected on the logging system startup, so whatever you will change, this class should always have access to original values, interesting for the logging system:
  • STDOUT
  • STDERR
It holds also other informations about the environment required for logs.
Author:
David Matejcek
  • Method Details

    • initialize

      public static void initialize()
      Call this method before you do any changes in global JVM objects like System.out!
    • getOriginalStdErr

      public static PrintStream getOriginalStdErr()
      Returns:
      the STDOUT PrintStream used at startup.
    • getOriginalStdOut

      public static PrintStream getOriginalStdOut()
      Returns:
      the STDOUT PrintStream used at startup.
    • resetStandardOutputs

      public static void resetStandardOutputs()
      Sets original values of the STDOUT and STDERR print streams back.
    • getProductId

      public static String getProductId()
      Returns:
      the name of the product. Can be null if not explicitly set.
    • setProductId

      public static void setProductId(String productId)
      Parameters:
      productId - the name of the product. It is null by default.
    • isReleaseParametersEarly

      public static boolean isReleaseParametersEarly()
      Returns:
      if true, parameters are forgotten after they were used in the message.
    • setReleaseParametersEarly

      public static void setReleaseParametersEarly(boolean releaseParametersEarly)
      Note: This method is used internally.
      Parameters:
      releaseParametersEarly - if true, parameters are forgotten after they were used in the message.
    • setResolveLevelWithIncompleteConfiguration

      public static void setResolveLevelWithIncompleteConfiguration(boolean resolveLevelWithIncompleteConfiguration)
      Note: This method is used internally.
      Parameters:
      resolveLevelWithIncompleteConfiguration - If true, log record level threshold is resolved even if the logging is not completely configured.
    • isResolveLevelWithIncompleteConfiguration

      public static boolean isResolveLevelWithIncompleteConfiguration()
      Returns:
      if true, log record level threshold is resolved even if the logging is not completely configured.