syntax = "proto3";

import "google/protobuf/empty.proto";

service Log {
  rpc SetLevel(SetLevelRequests) returns (LevelResponse) {};
  rpc ReSetLevel(google.protobuf.Empty) returns (LevelResponse) {};
  rpc GetLevel(google.protobuf.Empty) returns (LevelResponse) {};

  rpc EnableLocalLogging(StartLocalLoggingRequest) returns (LocalLoggingResponse) {};
  rpc LocalLoggingState(google.protobuf.Empty) returns (LocalLoggingResponse) {};
  rpc DisableLocalLogging(google.protobuf.Empty) returns (LocalLoggingResponse) {};
}

message SetLevelRequests {
  string level = 1;
  double duration = 2;
}

message LevelResponse {
  string current_level = 1;
  double seconds_to_reset_level = 2;
  string permanent_log_level = 3;
  string error = 4;
}


message StartLocalLoggingRequest {
  double duration = 1;
}

message LocalLoggingResponse {
  string status = 1;
  double disable_in = 2;
  string error = 3;
}