General

functions

[private] logger-conf

@function logger-conf($key) { ... }
View source

Description

Helper to get a key from $logger-configuration map.

Parameters

parameter Name parameter Description parameter Type parameter Default value
$key

Option to get from map

String none

Returns

Option from $logger-configuration or null if $key doesn't exist.

Any

Example

Get history from configuration map

$history: logger-conf("history");

Used by

mixins

logger

@mixin logger($minimum-level) { ... }
View source

Description

Instanciate a logger. This should be called once only.

Parameters

parameter Name parameter Description parameter Type parameter Default value
$minimum-level

Level at which the logger starts printing. Use OFF to disable.

String none

Example

Instanciate a new logger logging INFO and up.

 @include logger("INFO");

Requires

Used by

[private] log

@mixin log($level, $message) { ... }
View source

Description

Log a new $message with $level.

Parameters

parameter Name parameter Description parameter Type parameter Default value
$level

Message's level

String none
$message

Message to log

String none

Example

Log a new error.

 @include log("ERROR", "Something's wrong.");

Requires

[private] logger-update-history

@mixin logger-update-history($level, $message) { ... }
View source

Description

Update logger history

Parameters

parameter Name parameter Description parameter Type parameter Default value
$level

Message's level

String none
$message

Message to log

String none

Example

Update logger history with new entry

 @include logger-update-history($level, $message);

Requires

Used by

logger-print-logs

@mixin logger-print-logs() { ... }
View source

Description

Print logger history

Parameters

None.

Example

Print current logs.

 @include logger-print-logs;

Requires

logger-help

@mixin logger-help() { ... }
View source

Description

Print some extra informations about logger levels and what they mean

Parameters

None.

Example

Print some extra help.

 @include logger-help;