Fix bug in logging library