fluent-logger
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -9,2 +9,3 @@ // Type definitions for fluent-logger-node | ||
import { Transform } from 'winston-transport'; | ||
import { Writable } from 'stream'; | ||
@@ -36,2 +37,7 @@ declare namespace fluentLogger { | ||
interface StreamOptions { | ||
label?: string; | ||
encoding?: string; | ||
} | ||
type Timestamp = number | Date; | ||
@@ -48,2 +54,4 @@ type Callback = (err?: Error) => void; | ||
end(label: string, data: T, callback: Callback): void; | ||
toStream(label: string): Writable; | ||
toStream(opt: StreamOptions): Writable; | ||
} | ||
@@ -71,3 +79,3 @@ | ||
interface Constructable<T, U> { | ||
new(options: U) : T; | ||
new(tag: string, options: U) : T; | ||
} | ||
@@ -74,0 +82,0 @@ |
{ | ||
"name": "fluent-logger", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -164,4 +164,53 @@ # fluent-logger for Node.js | ||
See also [How to enable TLS/SSL encryption](https://docs.fluentd.org/v1.0/articles/in_forward#how-to-enable-tls/ssl-encryption). | ||
See also [How to enable TLS/SSL encryption](https://docs.fluentd.org/v1.0/articles/in_forward#how-to-enable-tls-encryption). | ||
### Mutual TLS Authentication | ||
Logger configuration: | ||
```js | ||
var logger = require('fluent-logger').createFluentSender('dummy', { | ||
host: 'localhost', | ||
port: 24224, | ||
timeout: 3.0, | ||
reconnectInterval: 600000, // 10 minutes | ||
security: { | ||
clientHostname: "client.localdomain", | ||
sharedKey: "secure_communication_is_awesome" | ||
}, | ||
tls: true, | ||
tlsOptions: { | ||
ca: fs.readFileSync('/path/to/ca_cert.pem'), | ||
cert: fs.readFileSync('/path/to/client-cert.pem'), | ||
key: fs.readFileSync('/path/to/client-key.pem'), | ||
passphrase: 'very-secret' | ||
} | ||
}); | ||
logger.emit('debug', { message: 'This is a message' }); | ||
``` | ||
Server configuration: | ||
```aconf | ||
<source> | ||
@type forward | ||
port 24224 | ||
<transport tls> | ||
ca_path /path/to/ca-cert.pem | ||
cert_path /path/to/server-cert.pem | ||
private_key_path /path/to/server-key.pem | ||
private_key_passphrase very_secret_passphrase | ||
client_cert_auth true | ||
</transport> | ||
<security> | ||
self_hostname input.testing.local | ||
shared_key secure_communication_is_awesome | ||
</security> | ||
</source> | ||
<match dummy.*> | ||
@type stdout | ||
</match> | ||
``` | ||
### EventTime support | ||
@@ -168,0 +217,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128615
21
1958
418