public class StructuredSyslogMessage extends AbstractSyslogMessage implements StructuredSyslogMessageIF
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
Syslog4j is licensed under the Lesser GNU Public License v2.1. A copy of the LGPL license is available in the META-INF folder in all distributions of Syslog4j and in the base directory of the "doc" ZIP.
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_STRUCTURED_DATA_PREFIX |
static int |
EMPTY_STRUCTURED_DATA_PREFIX_LENGTH |
DEFAULT_DATE_FORMAT, DEFAULT_DELIMITER, DEFAULT_REPLACE_DELIMITER, DEFAULT_TIME_FORMAT, UNDEFINED| Constructor and Description |
|---|
StructuredSyslogMessage(String messageId,
String procId,
Map<String,Map<String,String>> structuredData,
String message)
Constructs the
StructuredSyslogMessage using MSGID,
STRUCTURED-DATA and MSG fields, as described in:
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
The Map must be a String -> (Map of String -> String), which encompasses
the STRUCTURED-DATA field described in above document. |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkIsPrintable(String value) |
String |
createMessage() |
boolean |
equals(Object obj) |
static StructuredSyslogMessage |
fromString(String syslogMessageStr)
Parses and loads a
StructuredSyslogMessage from string. |
String |
getMessage()
Returns the MSG field of the structured message format, as described in:
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
|
String |
getMessageId()
Returns the MSGID field of the structured message format, as described
in:
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
|
String |
getProcId() |
Map<String,Map<String,String>> |
getStructuredData()
Returns the structured data map.
|
int |
hashCode() |
static int |
matchChar(String data,
int start,
char... matchChars) |
static String |
nilProtect(String value) |
static void |
sdEscape(StringBuffer sb,
String value) |
String |
toString() |
generateDate, generateDateAndTime, generateLocalHostName, generateTime, getDateFormat, getDelimiter, getReplaceDelimiter, getTimeFormat, nullOrEmpty, replaceDelimiterpublic static final String EMPTY_STRUCTURED_DATA_PREFIX
public static final int EMPTY_STRUCTURED_DATA_PREFIX_LENGTH
public StructuredSyslogMessage(String messageId, String procId, Map<String,Map<String,String>> structuredData, String message)
StructuredSyslogMessage using MSGID,
STRUCTURED-DATA and MSG fields, as described in:
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
The Map must be a String -> (Map of String -> String), which encompasses the STRUCTURED-DATA field described in above document.messageId - structuredData - message - public static StructuredSyslogMessage fromString(String syslogMessageStr)
StructuredSyslogMessage from string.syslogMessageStr - public String getMessageId()
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
public Map<String,Map<String,String>> getStructuredData()
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
public String getMessage()
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
public String getProcId()
public String createMessage()
createMessage in interface SyslogMessageIFcreateMessage in class AbstractSyslogMessagepublic static void sdEscape(StringBuffer sb, String value)
public static boolean checkIsPrintable(String value)
public static int matchChar(String data, int start, char... matchChars)
Copyright © 2017. All rights reserved.