mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Clarify documentation of File adapter semantics
This commit is contained in:
parent
18abd892ba
commit
4a012e28cc
@ -13,18 +13,23 @@ require 'rackstash/adapter/base_adapter'
|
|||||||
|
|
||||||
module Rackstash
|
module Rackstash
|
||||||
module Adapter
|
module Adapter
|
||||||
# This log adapter allows to write logs to a file acessible on the local
|
# This log adapter allows to write logs to a file accessible on the local
|
||||||
# filesystem. We assume filesystem semantics of the usual local filesystems
|
# filesystem. Written log lines are delimited by a newline character (`\n`).
|
||||||
# used on Linux, macOS, BSDs, or Windows. Here, we can ensure that even
|
# A suitable encoders should ensure that single logs do not contain any
|
||||||
# concurrent writes of multiple processes (e.g. multiple worker processes of
|
# verbatim newline characters themselves. All Rackstash encoders producing
|
||||||
# an application server) don't produce interleaved log lines.
|
# JSON formatted logs are suitable in this regard.
|
||||||
#
|
#
|
||||||
# When using a remote filesystem (e.g. NFS or most FUSE filesystems but not
|
# When writing the logs, we assume filesystem semantics of the usual local
|
||||||
# for SMB) it might be possible that concurrent log writes to the same file
|
# filesystems used on Linux, macOS, BSDs, or Windows. Here, we can ensure
|
||||||
# are interleaved on disk, resulting on probable log corruption. If this is
|
# that even concurrent writes of multiple processes (e.g. multiple worker
|
||||||
# a concern, you should make sure that only one log adapter of one process
|
# processes of an application server) don't produce interleaved log lines.
|
||||||
# write to a log file at a time or (preferrably) write to a local file
|
#
|
||||||
# instead.
|
# When using a remote filesystem it might be possible that concurrent log
|
||||||
|
# writes to the same file are interleaved on disk, resulting on probable
|
||||||
|
# log corruption. If this is a concern, you should make sure that only one
|
||||||
|
# log adapter of one process write to a log file at a time or (preferrably)
|
||||||
|
# write to a local file instead. This restriction applies to NFS and most
|
||||||
|
# FUSE filesystems like sshfs. SMB is likely safe to use here.
|
||||||
#
|
#
|
||||||
# When reading the log file, the reader might still see incomplete writes
|
# When reading the log file, the reader might still see incomplete writes
|
||||||
# depending on the OS and filesystem. Since we are only writing complete
|
# depending on the OS and filesystem. Since we are only writing complete
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user