Plug.AccessLog.Logfiles
Logfile agent.
Summary↑
get(logfile) | Returns the logfile device for writing |
open(logfile) | Opens a logfile for future writing |
replace(logfile, new_device) | Replaces the io_device associated with a logfile |
set(logfile, new_device) | Sets the io_device associated with a logfile |
start_link() | Starts the logfile agent |
Functions
Specs:
- get(logfile :: String.t) :: File.io_device | nil
Returns the logfile device for writing.
Specs:
- open(logfile :: String.t) :: File.io_device | nil
Opens a logfile for future writing.
Specs:
- replace(logfile :: String.t, new_device :: File.io_device) :: File.io_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.
Specs:
- set(logfile :: String.t, new_device :: File.io_device) :: File.io_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.
Specs:
- start_link :: Agent.on_start
Starts the logfile agent.