Class AgentLogManagerLog4j2Impl

java.lang.Object
com.netflix.genie.agent.cli.logging.AgentLogManagerLog4j2Impl
All Implemented Interfaces:
AgentLogManager

public final class AgentLogManagerLog4j2Impl extends Object implements AgentLogManager
Utility class that locates and relocates the agent log file. This implementation is based on log4j2.
Since:
4.0.0
  • Constructor Details

    • AgentLogManagerLog4j2Impl

      public AgentLogManagerLog4j2Impl(org.apache.logging.log4j.core.LoggerContext context)
      Constructor.
      Parameters:
      context - the log4j2 logger context
  • Method Details

    • getLogFilePath

      public Path getLogFilePath()
      Get the current location of the agent log file.
      Specified by:
      getLogFilePath in interface AgentLogManager
      Returns:
      a path string
    • relocateLogFile

      public void relocateLogFile(Path destinationPath) throws IOException
      Attempt to relocate the agent log file inside the job directory.
      Specified by:
      relocateLogFile in interface AgentLogManager
      Parameters:
      destinationPath - the destination path
      Throws:
      IOException - if relocation fails