# Logging

When linking with biwak, the logging functions from lepto are overloaded
(lWarning, lInfo, lCtitical, lFatal).
Unlike in lepto, the functions use an ringbuffer so they can be used in 
any place, e.g. interrupt routines.
The event-loop is called in biwakEventLoop().

## Heartbeat

When an CHeardBeat object was instantziated, it is automatically adjusted by
the logging functions. This event-loop is also called in biwakEventLoop().

The heartbeat LED has 4 states:

* Ok: regular heartbeat blinking
* Warning: fast blinking; disapears after 60 seconds.
  Can only be entered when current state is 'ok'.
* Critical: Slow blinking. This state can not be left.
* Fatal: LED on.

## Macros

Each compile unit can set preprocessor defines to adjust behaviour.
Those are the same defines as in lepto.

* LEPTO_LOG_USE_PRETTY_PRINT
* LEPTO_LOG_DEBUG
* LEPTO_LOG_DEBUG_ASSERT

## Custom channel

By default the log message is printed to stdout. If there is another medium 
should be used, BIWAK_LOG_CUSTOM_CHANNEL can be set to implement an additional 
output.
For example the log code can be send via CAN or be shown on an segmented 
display.
