leo_logger_client_base

The base of logger client.

References

Description

The base of logger client

Function Index

append/1 Append a message to a file.
force_rotation/1 Force log-rotation.
format/2 Format a log message.
new/4 Create loggers for message logs.
sync/1 Sync a log file.

Function Details

append/1

append(LogInfo) -> ok

  • LogInfo = {atom(), #message_log{}}

Append a message to a file

force_rotation/1

force_rotation(LogId) -> ok | {error, term()}

  • LogId = atom()

Force log-rotation

format/2

format(Appender, Log) -> string()

  • Appender = atom()
  • Log = #message_log{}

Format a log message

new/4

new(LogGroup, LogId, RootPath, LogFileName) -> ok

  • LogGroup = atom()
  • LogId = atom()
  • RootPath = string()
  • LogFileName = string()

Create loggers for message logs

sync/1

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

  • LogId = atom() | #logger_state{}

Sync a log file