LogDoc
Documentation > Log Collection > LogDoc TCP

Collecting logs via LogDoc TCP

A high-performance streaming protocol for reliable log delivery with ordering guarantees and delivery acknowledgement. Supports TLS encryption, data compression and automatic reconnection.

logdoc-tcp.conf
[tcp]
# LogDoc server address
host = logdoc-server
port = 12345

# TLS encryption
tls_enabled = true
tls_cert = /etc/logdoc/client.crt
tls_key = /etc/logdoc/client.key

# Data compression
compression = gzip

# Buffering on connection loss
buffer_size = 10000
retry_interval = 5s
Sending a test log
# Send via CLI
$ echo '{"level":"INFO","message":"test"}' | \
    logdoc-send --proto tcp --host logdoc-server --port 12345

# Check the connection
$ logdoc-ctl check tcp://logdoc-server:12345
Connection OK, latency: 2ms

Why TCP

Guaranteed delivery with acknowledgement of every packet
TLS encryption for secure data transfer
Automatic buffering on connection loss with retransmission