fluent / fluent/fluent-logger-forward-node

Node process doesn't exit if the destination is not available

Open
#46 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I stopped the fluentd server and tried the below code with node
```
const FluentClient = require("@fluent-org/logger").FluentClient;

const flDlogger = new FluentClient("test", {
eventMode: "Message",
socket: {
host: "localhost",
port: 24224,
timeout: 3000,
}
});
flDlogger.emit({}).then(() => { console.log("Sent Message Successfully")}).catch((e) => { console.log(e);})
```

The node process did not timeout/quit until the server becomes available, is there any flag/way to exit the node process if the destination becomes unavailable, i want to try this in AWS lambda and if the destination is not available then the lambda may run always.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.