Liking cljdoc? Tell your friends :D

lb.access-log.file-writer

Rotating file writer for access logs. Handles log file rotation based on size with configurable max files.

Rotating file writer for access logs.
Handles log file rotation based on size with configurable max files.
raw docstring

close!clj

(close! state)

Close the file writer.

Close the file writer.
sourceraw docstring

create-writerclj

(create-writer &
               {:keys [path max-size-mb max-files]
                :or {path "logs/access.log" max-size-mb 100 max-files 10}})

Create a rotating file writer.

Options: :path - Log file path (default: "logs/access.log") :max-size-mb - Max file size in MB before rotation (default: 100) :max-files - Max number of rotated files to keep (default: 10)

Returns a FileWriterState record.

Create a rotating file writer.

Options:
  :path - Log file path (default: "logs/access.log")
  :max-size-mb - Max file size in MB before rotation (default: 100)
  :max-files - Max number of rotated files to keep (default: 10)

Returns a FileWriterState record.
sourceraw docstring

flush!clj

(flush! state)

Flush the file writer buffer.

Flush the file writer buffer.
sourceraw docstring

get-statusclj

(get-status state)

Get file writer status.

Get file writer status.
sourceraw docstring

write-line!clj

(write-line! state line)

Write a line to the log file with automatic rotation.

Returns updated FileWriterState.

Write a line to the log file with automatic rotation.

Returns updated FileWriterState.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close