[services/core/logger] logger thread safety and efficiency fixes