Module logger

Logger is the process that writes our log messages to disk (and erlang shell).

Introduced in: 15 Nov 2002 by Magnus Ahltorp <ahltorp@nada.kth.se>

Behaviours: gen_server.

Authors: Magnus Ahltorp (ahltorp@nada.kth.se).

Description

Logger is the process that writes our log messages to disk (and erlang shell).

Data Types

state()

state() = #state{}

used to keep track of the files, used by the log functions, one file type of file is keept for each type of log (debug, normal, error)

Function Index

disable/1 Disables logging on one or more outputs.
enable/1 Enables logging on one or more outputs.
log/2Equivalent to log(Level, Format, []).
log/3 Log a log entry.
log_iolist/2 Log a log entry, without formatting the data in any way (except adding the timestamp-pid-level prefix).
quit/1 Terminate the logger process.
start_link/0 Start the 'logger' server, with a default logbase.
start_link/1 Start the 'logger' server start_link/0 uses the current application name, together with any configured logger_logdir as LogBase.

Function Details

disable/1

disable(Status::Which) -> {ok, Status} | {error, Reason}

Disables logging on one or more outputs.

enable/1

enable(Status::Which) -> {ok, Status} | {error, Reason}

Enables logging on one or more outputs.

log/2

log(Level, Format) -> ok

Equivalent to log(Level, Format, []).

log/3

log(Level, Format, Arguments) -> ok

Log a log entry.

log_iolist/2

log_iolist(Level, IOlist) -> ok

Log a log entry, without formatting the data in any way (except adding the timestamp-pid-level prefix).

quit/1

quit(Msg) -> ok | {error, Reason}

Terminate the logger process. If Msg is term(), it will be sent to the log before quitting "log(normal, Msg)".

start_link/0

start_link() -> term()

Start the 'logger' server, with a default logbase.

See also: start_link/1.

start_link/1

start_link(LogBase) -> term()

Start the 'logger' server start_link/0 uses the current application name, together with any configured logger_logdir as LogBase. The logger is only registered locally (on the current node)


Generated by EDoc, Oct 17 2007, 16:48:25.