Initialize logger in init function to avoid concurrency