Make library thread safe
Log handler has to be thread safe. This includes log
structure fields access to be atomic and locking for outputs.
-
make struct log
members atomic -
lock output when writing message in to it (we should use both flock to prevent collision with other outputs as well as internal lock if that fails) -
make that configurable to not add unnecessary load to single-thread apps