Class AgentLogManagerLog4j2Impl
- java.lang.Object
-
- com.netflix.genie.agent.cli.logging.AgentLogManagerLog4j2Impl
-
- All Implemented Interfaces:
AgentLogManager
public final class AgentLogManagerLog4j2Impl extends java.lang.Object implements AgentLogManager
Utility class that locates and relocates the agent log file. This implementation is based on log4j2.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description AgentLogManagerLog4j2Impl(org.apache.logging.log4j.core.LoggerContext context)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.Path
getLogFilePath()
Get the current location of the agent log file.void
relocateLogFile(java.nio.file.Path destinationPath)
Attempt to relocate the agent log file inside the job directory.
-
-
-
Method Detail
-
getLogFilePath
public java.nio.file.Path getLogFilePath()
Get the current location of the agent log file.- Specified by:
getLogFilePath
in interfaceAgentLogManager
- Returns:
- a path string
-
relocateLogFile
public void relocateLogFile(java.nio.file.Path destinationPath) throws java.io.IOException
Attempt to relocate the agent log file inside the job directory.- Specified by:
relocateLogFile
in interfaceAgentLogManager
- Parameters:
destinationPath
- the destination path- Throws:
java.io.IOException
- if relocation fails
-
-