public class BuildLogUtils extends Object
Modifier and Type | Method and Description |
---|---|
static LogEntry |
convertToLogEntry(String fileEntry)
Converts a line from a file back into a LogEntry object
|
static LogEntry |
convertToLogEntry(String fileEntry,
SimpleDateFormat dateFormat)
Deprecated.
|
static String |
convertToLogFileEntry(LogEntry logEntry)
Convert the specified LogEntry object into a string to be written to a log file
|
static Class<? extends LogEntry> |
getLogEntryType(String logLine)
Return the specific type of
LogEntry for the given log line. |
static File |
getLogFileDirectory(Key entityKey)
Retrieves the standard location for a builds log files based on the bamboo home
|
static File |
getLogFileDirectory(String entityKey)
Deprecated.
since 5.11, use
getLogFileDirectory(Key) instead |
static String |
getLogFileName(Key entityKey,
int resultNumber) |
static String |
getLogFileName(ResultKey resultKey) |
static String |
getLogFileName(String planKey,
int buildNumber)
Deprecated.
since 5.0 use
getLogFileName(com.atlassian.bamboo.Key, int) |
static void |
sendFileThroughLogger(File file,
BuildLogger buildLogger) |
public static String convertToLogFileEntry(@NotNull LogEntry logEntry)
logEntry
- the LogEntry to be written@NotNull public static Class<? extends LogEntry> getLogEntryType(@NotNull String logLine)
LogEntry
for the given log line.@NotNull public static LogEntry convertToLogEntry(@Nullable String fileEntry)
fileEntry
- to be converted@Nullable @Deprecated public static LogEntry convertToLogEntry(String fileEntry, @NotNull SimpleDateFormat dateFormat)
convertToLogEntry(String)
fileEntry
- to be converteddateFormat
- @Deprecated public static File getLogFileDirectory(@NotNull String entityKey)
getLogFileDirectory(Key)
insteadentityKey
- for this filepublic static File getLogFileDirectory(@NotNull Key entityKey)
entityKey
- for this file@Deprecated public static String getLogFileName(@NotNull String planKey, int buildNumber)
getLogFileName(com.atlassian.bamboo.Key, int)
planKey
- for the logs filebuildNumber
- for the log filepublic static void sendFileThroughLogger(@NotNull File file, @NotNull BuildLogger buildLogger) throws IOException
IOException
Copyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.