Constructor
new Syslog(optionsopt)
Construct a new Syslog transport object with user options
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Options object
>>>Transport Configuration
Properties
|
Requires:
- module:moment
Requires
- module:moment
Members
cef :CEF
Type:
- CEF
format :string
Type:
- string
leef :LEEF
Type:
- LEEF
port :number
Type:
- number
protocol :string
Type:
- string
rfc3164 :RFC3164
Type:
- RFC3164
rfc5424 :RFC5424
Type:
- RFC5424
target :string
Type:
- string
tcpTimeout :number
Type:
- number
tlsClientCert :string
Type:
- string
tlsClientKey :string
Type:
- string
tlsServerCerts :Array.<string>
Type:
- Array.<string>
(private) tlsServerCerts
Methods
(private) addTlsServerCerts(certs) → {Promise}
Add a TLS server certificate which can be used to authenticate the server
this syslog client is connecting too. This function will validate the
input as a file location string and add it to an array of certificates
Parameters:
Name | Type | Description |
---|---|---|
certs |
string | Array.<string> | File location of the certificate(s) |
Throws:
-
- A Type Error
- Type
- Error
Returns:
- True
- Type
- Promise
(private) send(msg) → {Promise}
Send the Syslog message to the selected target Syslog server using the
selected transport.
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | The formatted Syslog Message |
Throws:
-
-
- Timeout error for TCP and TLS connections
- Type
- Error
-
-
-
- Network Error
- Type
- Error
-
Returns:
- The Syslog formatted string sent
- Type
- Promise
(private) tcpMessage(msg) → {Promise}
Send the Syslog message over TCP
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | The formatted Syslog Message |
Throws:
-
-
- Timeout error for TCP and TLS connections
- Type
- Error
-
-
-
- Network Error
- Type
- Error
-
Returns:
- The Syslog formatted string sent
- Type
- Promise
(private) tlsMessage(msg) → {Promise}
Send the Syslog message over TLS
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | The formatted Syslog Message |
Throws:
-
-
- Timeout error for TCP and TLS connections
- Type
- Error
-
-
-
- Network Error
- Type
- Error
-
Returns:
- The Syslog formatted string sent
- Type
- Promise
(private) udpMessage(msg) → {Promise}
Send the Syslog message over UDP
Parameters:
Name | Type | Description |
---|---|---|
msg |
string | The formatted Syslog Message |
Throws:
-
- Network Error
- Type
- Error
Returns:
- The Syslog formatted string sent
- Type
- Promise