allow to clear log sinks
add unit tests for logging