Class JavaLookup

java.lang.Object
org.apache.logging.log4j.core.lookup.AbstractLookup
org.apache.logging.log4j.core.lookup.JavaLookup
All Implemented Interfaces:
StrLookup

@Plugin(name="java", category="Lookup") public class JavaLookup extends AbstractLookup
Looks up keys related to Java: Java version, JRE version, VM version, and so on.
  • Constructor Details

    • JavaLookup

      public JavaLookup()
  • Method Details

    • getHardware

      public String getHardware()
      Accessible through the Lookup key hw.
      Returns:
      hardware processor information.
    • getLocale

      public String getLocale()
      Accessible through the Lookup key locale.
      Returns:
      system locale and file encoding information.
    • getOperatingSystem

      public String getOperatingSystem()
      Accessible through the Lookup key os.
      Returns:
      operating system information.
    • getRuntime

      public String getRuntime()
      Accessible through the Lookup key runtime.
      Returns:
      Java Runtime Environment information.
    • getVirtualMachine

      public String getVirtualMachine()
      Accessible through the Lookup key vm.
      Returns:
      Java Virtual Machine information.
    • lookup

      public String lookup(LogEvent event, String key)
      Looks up the value of the environment variable.
      Parameters:
      event - The current LogEvent (is ignored by this StrLookup).
      key - the key to be looked up, may be null
      Returns:
      The value of the environment variable.