VersionLoggerListener (Apache Tomcat 11.0.23 API Documentation)
Description: declaration: package: org.apache.catalina.startup, class: VersionLoggerListener

# Class VersionLoggerListener

java.lang.Object
org.apache.catalina.startup.VersionLoggerListener

All Implemented Interfaces:
  `LifecycleListener`

public class VersionLoggerListener extends Object implements LifecycleListener
Logs version information on startup.

This listener must only be nested within `Server` elements and should be the first listener defined.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final StringManager`
  `sm`
  The string manager for this package.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VersionLoggerListener()`
  Constructs a new VersionLoggerListener.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `getLogArgs()`
  Returns whether JVM arguments will be logged.
  `boolean`
  `getLogEnv()`
  Returns whether environment variables will be logged.
  `boolean`
  `getLogProps()`
  Returns whether system properties will be logged.
  `void`
  `lifecycleEvent(LifecycleEvent event)`
  Acknowledge the occurrence of the specified event.
  `void`
  `setLogArgs(boolean logArgs)`
  Sets whether JVM arguments will be logged.
  `void`
  `setLogEnv(boolean logEnv)`
  Sets whether environment variables will be logged.
  `void`
  `setLogProps(boolean logProps)`
  Sets whether system properties will be logged.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### sm

    protected static final StringManager sm
    The string manager for this package.

- ## Constructor Details

  - ### VersionLoggerListener

    public VersionLoggerListener()
    Constructs a new VersionLoggerListener.

- ## Method Details

  - ### getLogArgs

    public boolean getLogArgs()
    Returns whether JVM arguments will be logged.
    Returns:
      `true` if JVM arguments will be logged

  - ### setLogArgs

    public void setLogArgs(boolean logArgs)
    Sets whether JVM arguments will be logged.
    Parameters:
      `logArgs` - Whether to log JVM arguments

  - ### getLogEnv

    public boolean getLogEnv()
    Returns whether environment variables will be logged.
    Returns:
      `true` if environment variables will be logged

  - ### setLogEnv

    public void setLogEnv(boolean logEnv)
    Sets whether environment variables will be logged.
    Parameters:
      `logEnv` - Whether to log environment variables

  - ### getLogProps

    public boolean getLogProps()
    Returns whether system properties will be logged.
    Returns:
      `true` if system properties will be logged

  - ### setLogProps

    public void setLogProps(boolean logProps)
    Sets whether system properties will be logged.
    Parameters:
      `logProps` - Whether to log system properties

  - ### lifecycleEvent

    public void lifecycleEvent(LifecycleEvent event)
    Description copied from interface: `LifecycleListener`
    Acknowledge the occurrence of the specified event.
    Specified by:
      `lifecycleEvent` in interface `LifecycleListener`
    Parameters:
      `event` - LifecycleEvent that has occurred