Plug.AccessLog v0.11.0 Plug.AccessLog.Logfiles

Logfile agent.

Summary

Functions

Returns the logfile device for writing

Opens a logfile for future writing

Replaces the io_device associated with a logfile

Sets the io_device associated with a logfile

Starts the logfile agent

Functions

get(logfile)

Specs

get(String.t) :: File.io_device | nil

Returns the logfile device for writing.

open(logfile)

Specs

open(String.t) :: File.io_device | nil

Opens a logfile for future writing.

replace(logfile, new_device)

Replaces the io_device associated with a logfile.

The already registered (if any) io_device will be closed using File.close/1.

The new io_device associated with the logfile will be returned.

set(logfile, new_device)

Sets the io_device associated with a logfile.

If a logfile is already associated with an io_device the passed one will be closed using File.close/1.

The new io_device associated with the logfile will be returned.

start_link()

Specs

start_link :: Agent.on_start

Starts the logfile agent.