@Service public class LogMessageService extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
BACKWARD_SLASH |
static String |
DOT |
static String |
FOUR_SPACES |
static String |
LINE_SEPARATOR |
static String |
LOG_SEPARATOR |
private static String |
NOT_ALLOWED_AT_THE_END |
private static String |
WORDS_SEPARATOR |
| Constructor and Description |
|---|
LogMessageService() |
| Modifier and Type | Method and Description |
|---|---|
private void |
appendEscapedToRow(int maxRowLength,
StringBuilder row,
String replaced,
boolean hasMoreTokens) |
private String |
escapeToken(String token) |
String |
parseMessage(String line,
int maxRowLength)
Parse a message from a log line and split it to rows.
|
private String[] |
splitLongTokens(String[] tokens,
int maxRowLength) |
public static final String LINE_SEPARATOR
public static final String LOG_SEPARATOR
public static final String DOT
public static final String FOUR_SPACES
private static final String WORDS_SEPARATOR
private static final String BACKWARD_SLASH
private static final String NOT_ALLOWED_AT_THE_END
public LogMessageService()
public String parseMessage(String line, int maxRowLength)
line - for example
04.03.2019 18:41:13.658|main|INFO |com.credibledoc.substitution.core.configuration.ConfigurationService - Properties loaded by ClassLoader from the resource: file..
maxRowLength - maximal number of characters in a rowProperties loaded by ClassLoader from the resource: file..
private String[] splitLongTokens(String[] tokens, int maxRowLength)
private String escapeToken(String token)
private void appendEscapedToRow(int maxRowLength, StringBuilder row, String replaced, boolean hasMoreTokens)
Copyright © 2019. All rights reserved.