Goby3  3.1.5a
2024.05.23
debug_logger.proto
Go to the documentation of this file.
1 syntax = "proto2";
2 import "goby/protobuf/option_extensions.proto";
3 import "dccl/option_extensions.proto";
4 
5 package goby.util.protobuf;
6 
7 message GLogConfig
8 {
9  option (dccl.msg).unit_system = "si";
10  enum Verbosity
11  {
12  QUIET = 1;
13  WARN = 2;
14  VERBOSE = 4;
15  DEBUG1 = 5;
16  DEBUG2 = 6;
17  DEBUG3 = 7;
18  }
19 
20  optional Verbosity tty_verbosity = 1
21  [default = QUIET, (goby.field).description = "Terminal verbosity"];
22 
23  optional bool show_gui = 2 [
24  default = false,
25  (goby.field).description =
26  "Set to true to display windowed NCurses GUI for terminal output."
27  ];
28 
29  message FileLog
30  {
31  optional string file_name = 1 [
32  (goby.field).description =
33  "Path to the debug file to write. If 'file_dir' is set, this "
34  "field is the path relative to 'file_dir', otherwise it is an "
35  "absolute path. The string '%1%' must be present (unless omit.file_timestamp = true), which will "
36  "be replaced by the current UTC date and time. Additionally, "
37  "'%2%' will be replaced by the application name if present.",
38  default = "%2%_%1%.txt",
39  (goby.field).cfg = { action: ADVANCED }
40  ];
41  optional string file_dir = 2 [
42  (goby.field).description =
43  "Directory to store log file in. If not specified, 'file_name' "
44  "will be assumed to be an full path to the log file"
45  ];
46 
47  optional Verbosity verbosity = 3 [
48  default = VERBOSE,
49  (goby.field).description = "Verbosity for this file log"
50  ];
51 
52  optional uint32 log_rotate_sec = 4 [
53  (goby.field).description =
54  "How often to rotate the glog file, in seconds.",
55  (dccl.field).units.base_dimensions = "T",
56  (goby.field).cfg = { action: ADVANCED }
57  ];
58 
59  message Omit
60  {
61  optional bool file_timestamp = 1 [default = false];
62  optional bool latest_symlink = 2 [default = false];
63  }
64  optional Omit omit = 5;
65  }
66  optional FileLog file_log = 3
67  [(goby.field).description = "Open a file for (debug) logging."];
68 
69  optional bool show_dccl_log = 4
70  [default = false, (goby.field).cfg = { action: ADVANCED }];
71 }