Files
kratos-bootstrap/api/protos/conf/v1/kratos_conf_logger.proto

57 lines
1.4 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package conf;
option go_package = "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1;conf";
// 日志
message Logger {
// Zap
message Zap {
string filename = 1; //
string level = 2; //
int32 max_size = 3; //
int32 max_age = 4; //
int32 max_backups = 5; //
}
// logrus
message Logrus {
string level = 1; // 日志等级
string formatter = 2; // 输出格式text, json.
string timestamp_format = 3; // 定义时间戳格式,例如:"2006-01-02 15:04:05"
bool disable_colors = 4; // 不需要彩色日志
bool disable_timestamp = 5; // 不需要时间戳
bool force_colors = 6; // 是否开启彩色日志
}
// Fluent
message Fluent {
string endpoint = 1; // 公网接入地址
}
// 阿里云
message Aliyun {
string endpoint = 1; // 公网接入地址
string project = 2; //
string access_key = 3; // 访问密钥ID
string access_secret = 4; // 访问密钥
}
// 腾讯
message Tencent {
string endpoint = 1; // 公网接入地址
string topic_id = 2; //
string access_key = 3; // 访问密钥ID
string access_secret = 4; // 访问密钥
}
string type = 1;
optional Zap zap = 2;
optional Logrus logrus = 3;
optional Fluent fluent = 4;
optional Aliyun aliyun = 5;
optional Tencent tencent = 6;
}