Search in sources :

Example 1 with OperatingSystem

use of io.micronaut.starter.application.OperatingSystem in project micronaut-starter by micronaut-projects.

the class Logback method apply.

@Override
public void apply(GeneratorContext generatorContext) {
    OperatingSystem operatingSystem = generatorContext.getOperatingSystem();
    boolean jansi = false;
    if (operatingSystem != OperatingSystem.WINDOWS) {
        jansi = true;
    }
    generatorContext.addTemplate("loggingConfig", new RockerTemplate("src/main/resources/logback.xml", logback.template(jansi)));
}
Also used : OperatingSystem(io.micronaut.starter.application.OperatingSystem) RockerTemplate(io.micronaut.starter.template.RockerTemplate)

Aggregations

OperatingSystem (io.micronaut.starter.application.OperatingSystem)1 RockerTemplate (io.micronaut.starter.template.RockerTemplate)1