All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zalando.logbook.spring.LogbookProperties Maven / Gradle / Ivy

There is a newer version: 3.10.0
Show newest version
package org.zalando.logbook.spring;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.zalando.logbook.DefaultHttpLogWriter.Level;
import org.zalando.logbook.Logbook;

import java.util.ArrayList;
import java.util.List;

@ConfigurationProperties(prefix = "logbook")
public final class LogbookProperties {

    private final List exclude = new ArrayList<>();
    private final Obfuscate obfuscate = new Obfuscate();
    private final Write write = new Write();

    public List getExclude() {
        return exclude;
    }

    public Obfuscate getObfuscate() {
        return obfuscate;
    }

    public Write getWrite() {
        return write;
    }

    public static class Obfuscate {

        private final List headers = new ArrayList<>();
        private final List parameters = new ArrayList<>();

        public List getHeaders() {
            return headers;
        }

        public List getParameters() {
            return parameters;
        }

    }

    public static class Write {

        private String category = Logbook.class.getName();
        private Level level = Level.TRACE;
        private int chunkSize = 0;

        public String getCategory() {
            return category;
        }

        public void setCategory(final String category) {
            this.category = category;
        }

        public Level getLevel() {
            return level;
        }

        public void setLevel(final Level level) {
            this.level = level;
        }

        public int getChunkSize() {
            return chunkSize;
        }

        public void setChunkSize(final int chunkSize) {
            this.chunkSize = chunkSize;
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy