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