blob: 75861877983ddaac1733fe492258f7a132fa40dd [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";
18package metropolis.pkg.logtree.proto;
19option go_package = "source.monogon.dev/metropolis/pkg/logtree/proto";
20
21import "google/protobuf/timestamp.proto";
22
23// Severity level corresponding to //metropolis/pkg/logtree.Severity.
24enum LeveledLogSeverity {
25 INVALID = 0;
26 INFO = 1;
27 WARNING = 2;
28 ERROR = 3;
29 FATAL = 4;
30}
31
32// LogEntry corresponding to logtree.LogEntry in //metropolis/pkg/logtree.
33message 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}