Class DestinationParser
java.lang.Object
net.logstash.logback.appender.destination.DestinationParser
Constructs
InetSocketAddress
es by parsing String
values.-
Method Summary
Modifier and TypeMethodDescriptionstatic List<InetSocketAddress>
ConstructsInetSocketAddress
es by parsing the givenString
value.
-
Method Details
-
parse
ConstructsInetSocketAddress
es by parsing the givenString
value.The string is a comma separated list of destinations in the form of hostName[:portNumber] where:
hostName
can be a hostname (eg. localhost), an IPv4 (eg. 192.168.1.1) or an IPv6 enclosed between brackets (eg. [2001:db8::1])portNumber
is optional and, if specified, must be prefixed by a colon. Must be a valid integer between 0 and 65535. IfportNumber
is not provided, then the givendefaultPort
will be used.
For example, "host1.domain.com,host2.domain.com:5560"
- Parameters:
destinations
- comma-separated list of destinations in the form ofhostName[:portNumber]
defaultPort
- the port number to use when a destination does not specify one explicitly- Returns:
- ordered list of
InetSocketAddress
instances
-