logi_ex v0.1.1 Logi.SinkWriter behaviour
Sink Writer Behaviour.
A sink writer will write log messages to a destination sink process.
The main purpose of writers is to write messages to some output devices (e.g., tty, file, socket).
Summary
Types
A module that implements the Logi.SinkWriter behaviour
A writer instance
The data written to a sink
Functions
Returns true if x is a module which implements this behaviour, otherwise false
Gets the module of writer
Gets the state of writer
Gets the writee process of log messages
Creates a new writer instance
Writes a log message
Returns true if x is a writer/0 instance, otherwise false
Types
A module that implements the Logi.SinkWriter behaviour.
The value of the fourth arguemnt of the write/4 callback function.
Note
This value might be loaded from ETS every time when a log message is issued. Therefore, very huge state can cause a performance problem.
A writer instance.
The data written to a sink.
Functions
Returns true if x is a module which implements this behaviour, otherwise false.
Gets the module of writer.
Gets the writee process of log messages.
“writee” is the destination process of written_data/0 of write/4.
If such process is dead or unknown, the function returns :undefined.
The result value might change on every call.
Creates a new writer instance.
write(Logi.Context.context, :io.format, Logi.Layout.data, writer) :: written_data
Writes a log message.
If it fails to write, an exception will be raised.
Returns true if x is a writer/0 instance, otherwise false.
Callbacks
Gets the writee process of log messages.
write(Logi.Context.context, :io.format, Logi.Layout.data, state) :: written_data
Writes a log message to somewhere.