Fix circular dependency in logging module