github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/util/log/log.proto (about) 1 // Copyright 2016 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 syntax = "proto3"; 12 package cockroach.util.log; 13 option go_package = "log"; 14 15 import "gogoproto/gogo.proto"; 16 17 enum Severity { 18 UNKNOWN = 0; 19 INFO = 1; 20 WARNING = 2; 21 ERROR = 3; 22 FATAL = 4; 23 // NONE is used to specify when no messages 24 // should be printed to the log file or stderr. 25 NONE = 5; 26 // DEFAULT is the end sentinel. It is used during command-line 27 // handling to indicate that another value should be replaced instead 28 // (depending on which command is being run); see cli/flags.go for 29 // details. 30 DEFAULT = 6; 31 } 32 33 // Entry represents a cockroach structured log entry. 34 message Entry { 35 Severity severity = 1; 36 // Nanoseconds since the epoch. 37 int64 time = 2; 38 int64 goroutine = 6; 39 string file = 3; 40 int64 line = 4; 41 string message = 5; 42 } 43 44 // A FileDetails holds all of the particulars that can be parsed by the name of 45 // a log file. 46 message FileDetails { 47 string program = 1; 48 string host = 2; 49 string user_name = 3; 50 reserved 4; 51 int64 time = 5; 52 int64 pid = 6 [(gogoproto.customname) = "PID"]; 53 } 54 55 message FileInfo { 56 string name = 1; 57 int64 size_bytes = 2; 58 int64 mod_time_nanos = 3; 59 FileDetails details = 4 [(gogoproto.nullable) = false]; 60 }