Module leo_logger_appender_file

The file appender.

Behaviours: leo_logger_behavior.

References

Description

The file appender

Function Index

append/2Append a message to a file.
bulk_output/2Output messages.
close/1Close the log file.
format/2Format a log message.
init/3Initialize the logger.
rotate/2Rotate the log file.
sync/1Synchronize the file.

Function Details

append/2

append(Msg, State) -> #logger_state{}

Append a message to a file

bulk_output/2

bulk_output(Logs, State) -> #logger_state{}

Output messages

close/1

close(State) -> ok | {error, any()}

Close the log file

format/2

format(Type, Msg) -> Ret

Format a log message

init/3

init(Appender, CallbackMod, Props) -> {ok, #logger_state{}} | {error, term()}

Initialize the logger

rotate/2

rotate(Hours, State) -> {ok, #logger_state{}}

Rotate the log file

sync/1

sync(State) -> ok | {error, term()}

Synchronize the file


Generated by EDoc