
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
An adapter stream bunyan events to a TCP socket (with reconnection and buffering)
TCP transport for Bunyan with reconnection.
var tcpStream = bunyanTcp.createBunyanStream({
server: 'my.logging.server',
port: 1234,
});
var log = bunyan.createLogger({
name: 'log',
streams: [
{
level: 'info',
stream: tcpStream,
type: 'raw',
closeOnExit: true
}
]
});
Name | Description | Default |
---|---|---|
server (required) | The host to connect to | none |
port (required) | The server port to connect to | none |
reconnectDelay | Time to pause between disconnect and reconnect (in ms) | 5000ms |
offlineBuffer | Number of messages to buffer while disconnected | 100 messages |
transform | A function that takes a bunyan event and returns a JSON object that will be serialized to the remote server | identity |
Name | Description | Arguments |
---|---|---|
connecting | Emitted when the stream attempts a connection | Number of unsuccessful connection attempts |
connect | Emitted on successful connection | Number of successful connections during the life of this process. |
disconnect | Got disconnected from the remote server | none |
dropped_messages | Emitted when the stream reconnects if some events have been discarded to stay in buffer limits | Number of dropped messages. |
Name | Description |
---|---|
connect | If previously closed, attempts to reconnect. This is called on instantiation. |
close | Disconnect from the remote server |
bufferedMessageCount | If currently disconnected, the number of messages in offline buffer |
droppedMessageCount | If currently disconnected, number of messages that have been discarded |
FAQs
An adapter stream bunyan events to a TCP socket (with reconnection and buffering)
We found that bunyan-tcp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.