// Copyright 2017 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package adapter.stdio.config;

import "gogoproto/gogo.proto";

option go_package = "config";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = false;
option (gogoproto.gostring_all) = false;

message Params {
    // Stream is used to select between different log output sinks.
    enum Stream {
        STDOUT = 0;
        STDERR = 1;
    }

    // Importance level for individual items output by this adapter.
    enum Level {
        INFO = 0;
        WARNING = 1;
        ERROR = 2;
    }

    // Selects which standard stream to write to for log entries.
    // STDERR is the default Stream.
    Stream log_stream = 1;

    // Maps from severity strings as specified in LogEntry instances to
    // the set of levels supported by this adapter.
    map<string, Level> severity_levels = 2;

    // The level to assign to metrics being output.
    Level metric_level = 3;

    // Whether to output a console-friendly or json-friendly format
    bool output_as_json = 4;
}
