public class TempLogFile extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
deleteLogFileAfterSuccess()
Closes the log file handler and delete the temp log file .
|
File |
getLogFile()
Gets the name of the log file.
|
String |
getPath()
Return the absolute path of the temp log file.
|
boolean |
isEnabled()
Return
true if a temp log file has been created and could be used to log messages. |
static TempLogFile |
newTempLogFile(String prefix)
Creates a new temporary log file.
|
public static TempLogFile newTempLogFile(String prefix)
Log file will be generated in the OS temporary directory and its name will have the following pattern: prefix-[RANDOM_NUMBER_STRING].log
prefix - log file prefix to which log messages will be written.public File getLogFile()
public void deleteLogFileAfterSuccess()
public boolean isEnabled()
true if a temp log file has been created and could be used to log messages.true if a temp log file has been created and could be used to log messages.public String getPath()
Copyright © 2010-2020 Wren Security. All Rights Reserved.