syntax = "proto3";
package cmvr.config;

enum LogLevel {
  LOG_LEVEL_UNSPECIFIED = 0;
  LOG_LEVEL_DEBUG = 1;
  LOG_LEVEL_INFO = 2;
  LOG_LEVEL_WARNING = 3;
  LOG_LEVEL_ERROR = 4;
  LOG_LEVEL_FATAL = 5;
}

message LogRoute {
  LogLevel level = 1;
  bool terminal = 2;
  bool file = 3;
}

message LogFormat {
  optional bool show_time = 1;
  optional bool show_level = 2;
  optional bool show_thread_id = 3;
  optional bool show_source_location = 4;
}

message LoggerConfig {
  LogLevel minimum_level = 1;
  repeated LogRoute routes = 2;
  string directory = 3;
  int32 max_file_size_mb = 4;
  int32 flush_interval_seconds = 5;
  LogFormat format = 6;
}

message LoggerRootConfig {
  LoggerConfig logger = 1;
}
