io.convergence_platform.services.observability.LogSerializerConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of service-lib Show documentation
Show all versions of service-lib Show documentation
Holds the common functionality needed by all Convergence Platform-based services written in Java.
The newest version!
package io.convergence_platform.services.observability;
import io.convergence_platform.services.observability.serializers.JsonLogSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
@Component
public class LogSerializerConfig {
@Value("${application.mode}")
public String mode;
@Value("${observability.path}")
public String logFolder;
@Bean
public ILogSerializer create() {
return new JsonLogSerializer(logFolder, mode.equals("production"));
}
}