blob: fb80a71b86fe277ec56d295266e9881a1837283d [file] [log] [blame]
Tim Windelschmidt8814f522024-05-08 00:41:13 +02001// Copyright 2020 The Monogon Project Authors.
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Licensed under the Apache License, Version 2.0 (the "License");
6// you may not use this file except in compliance with the License.
7// You may obtain a copy of the License at
8//
9// http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing, software
12// distributed under the License is distributed on an "AS IS" BASIS,
13// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14// See the License for the specific language governing permissions and
15// limitations under the License.
16
17syntax = "proto3";
Tim Windelschmidt2f9f6242025-01-11 08:25:54 +010018package osbase.logtree.proto;
Tim Windelschmidt9f21f532024-05-07 15:14:20 +020019option go_package = "source.monogon.dev/osbase/logtree/proto";
Tim Windelschmidt8814f522024-05-08 00:41:13 +020020
21import "google/protobuf/timestamp.proto";
22
Tim Windelschmidt9f21f532024-05-07 15:14:20 +020023// Severity level corresponding to //osbase/logtree.Severity.
Tim Windelschmidt8814f522024-05-08 00:41:13 +020024enum LeveledLogSeverity {
25 INVALID = 0;
26 INFO = 1;
27 WARNING = 2;
28 ERROR = 3;
29 FATAL = 4;
30}
31
Tim Windelschmidt9f21f532024-05-07 15:14:20 +020032// LogEntry corresponding to logtree.LogEntry in //osbase/logtree.
Tim Windelschmidt8814f522024-05-08 00:41:13 +020033message LogEntry {
34 // A leveled log entry emitted from a compatible system, eg. Metorpolis code
35 // or a klog-parsed line.
36 message Leveled {
37 repeated string lines = 1;
38 google.protobuf.Timestamp timestamp = 2;
39 LeveledLogSeverity severity = 3;
40 // Source of the error, expressed as file:line.
41 string location = 4;
42 }
43 // Raw log entry, captured from an external system without parting. Might
44 // contain some timestamp/level/origin information embedded in data. Data
45 // contained within should be treated as unsanitized external data.
46 message Raw {
47 string data = 1;
48 // Original length of line, set if data was truncated.
49 int64 original_length = 2;
50 }
51
52 // Origin DN (Distinguished Name), a unique identifier which is provided by
53 // the supervisor system.
54 string dn = 1;
55 oneof kind {
56 Leveled leveled = 2;
57 Raw raw = 3;
58 }
59}