core/log: thread safe; modules/astra: refactoring