Phauxth v0.10.0 Phauxth.Log
Logging functions for Phauxth.
Format
Phauxth uses logfmt to provide a standard logging format.
15:31:08.575 [warn] user=ray@mail.com message=”invalid password”
- user - the user identifier (one of email, username, nil)
- message - error / info message
- meta - additional metadata that does not fit into any of the other categories
Log levels
The available log levels are :info, :warn and false.
The level at which logging starts can be configured by changing
the log_level
value in the config file.
The default log_level is :info, but if you only want warnings printed out, add the following to the config file:
config :phauxth,
log_level: :warn
And if you do not want Phauxth to print out any logs, set the log_level to false.
Summary
Functions
Returns the id of the currently logged-in user, if present
Returns the debug log message
Returns the error log message
Returns the info log message
Returns the warn log message