Initializes logging based on the specified environment and output configurations.