logging

package
v0.6.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2020 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Level_name = map[int32]string{
	0: "DEBUG",
	1: "INFO",
	2: "WARN",
	3: "ERROR",
	4: "DPANIC",
	5: "PANIC",
	6: "FATAL",
}
View Source
var Level_value = map[string]int32{
	"DEBUG":  0,
	"INFO":   1,
	"WARN":   2,
	"ERROR":  3,
	"DPANIC": 4,
	"PANIC":  5,
	"FATAL":  6,
}
View Source
var ResponseStatus_name = map[int32]string{
	0: "OK",
	1: "FAILED",
	2: "PRECONDITION_FAILED",
}
View Source
var ResponseStatus_value = map[string]int32{
	"OK":                  0,
	"FAILED":              1,
	"PRECONDITION_FAILED": 2,
}

Functions

func RegisterLoggerServer

func RegisterLoggerServer(s *grpc.Server, srv LoggerServer)

Types

type GetLevelRequest added in v0.6.14

type GetLevelRequest struct {
	// logger name
	LoggerName           string   `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetLevelRequest) Descriptor added in v0.6.14

func (*GetLevelRequest) Descriptor() ([]byte, []int)

func (*GetLevelRequest) GetLoggerName added in v0.6.14

func (m *GetLevelRequest) GetLoggerName() string

func (*GetLevelRequest) ProtoMessage added in v0.6.14

func (*GetLevelRequest) ProtoMessage()

func (*GetLevelRequest) Reset added in v0.6.14

func (m *GetLevelRequest) Reset()

func (*GetLevelRequest) String added in v0.6.14

func (m *GetLevelRequest) String() string

func (*GetLevelRequest) XXX_DiscardUnknown added in v0.6.14

func (m *GetLevelRequest) XXX_DiscardUnknown()

func (*GetLevelRequest) XXX_Marshal added in v0.6.14

func (m *GetLevelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetLevelRequest) XXX_Merge added in v0.6.14

func (m *GetLevelRequest) XXX_Merge(src proto.Message)

func (*GetLevelRequest) XXX_Size added in v0.6.14

func (m *GetLevelRequest) XXX_Size() int

func (*GetLevelRequest) XXX_Unmarshal added in v0.6.14

func (m *GetLevelRequest) XXX_Unmarshal(b []byte) error

type GetLevelResponse added in v0.6.14

type GetLevelResponse struct {
	Level                Level    `protobuf:"varint,1,opt,name=level,proto3,enum=onos.lib.go.logging.Level" json:"level,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetLevelResponse) Descriptor added in v0.6.14

func (*GetLevelResponse) Descriptor() ([]byte, []int)

func (*GetLevelResponse) GetLevel added in v0.6.14

func (m *GetLevelResponse) GetLevel() Level

func (*GetLevelResponse) ProtoMessage added in v0.6.14

func (*GetLevelResponse) ProtoMessage()

func (*GetLevelResponse) Reset added in v0.6.14

func (m *GetLevelResponse) Reset()

func (*GetLevelResponse) String added in v0.6.14

func (m *GetLevelResponse) String() string

func (*GetLevelResponse) XXX_DiscardUnknown added in v0.6.14

func (m *GetLevelResponse) XXX_DiscardUnknown()

func (*GetLevelResponse) XXX_Marshal added in v0.6.14

func (m *GetLevelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetLevelResponse) XXX_Merge added in v0.6.14

func (m *GetLevelResponse) XXX_Merge(src proto.Message)

func (*GetLevelResponse) XXX_Size added in v0.6.14

func (m *GetLevelResponse) XXX_Size() int

func (*GetLevelResponse) XXX_Unmarshal added in v0.6.14

func (m *GetLevelResponse) XXX_Unmarshal(b []byte) error

type Level

type Level int32

Logger level

const (
	// Debug log level
	Level_DEBUG Level = 0
	// Info log level
	Level_INFO Level = 1
	// Warn log level
	Level_WARN Level = 2
	// Error log level
	Level_ERROR Level = 3
	// DPanic log level
	Level_DPANIC Level = 4
	// Panic log level
	Level_PANIC Level = 5
	// Fatal log level
	Level_FATAL Level = 6
)

func (Level) EnumDescriptor

func (Level) EnumDescriptor() ([]byte, []int)

func (Level) String

func (x Level) String() string

type LoggerClient

type LoggerClient interface {
	// Sets a logger level
	SetLevel(ctx context.Context, in *SetLevelRequest, opts ...grpc.CallOption) (*SetLevelResponse, error)
	// Gets a logger level
	GetLevel(ctx context.Context, in *GetLevelRequest, opts ...grpc.CallOption) (*GetLevelResponse, error)
}

LoggerClient is the client API for Logger service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewLoggerClient

func NewLoggerClient(cc *grpc.ClientConn) LoggerClient

type LoggerServer

type LoggerServer interface {
	// Sets a logger level
	SetLevel(context.Context, *SetLevelRequest) (*SetLevelResponse, error)
	// Gets a logger level
	GetLevel(context.Context, *GetLevelRequest) (*GetLevelResponse, error)
}

LoggerServer is the server API for Logger service.

type ResponseStatus

type ResponseStatus int32
const (
	ResponseStatus_OK                  ResponseStatus = 0
	ResponseStatus_FAILED              ResponseStatus = 1
	ResponseStatus_PRECONDITION_FAILED ResponseStatus = 2
)

func (ResponseStatus) EnumDescriptor

func (ResponseStatus) EnumDescriptor() ([]byte, []int)

func (ResponseStatus) String

func (x ResponseStatus) String() string

type SetLevelRequest

type SetLevelRequest struct {
	// logger name
	LoggerName string `protobuf:"bytes,1,opt,name=logger_name,json=loggerName,proto3" json:"logger_name,omitempty"`
	// logger level
	Level                Level    `protobuf:"varint,2,opt,name=level,proto3,enum=onos.lib.go.logging.Level" json:"level,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SetLevelRequest request for setting a logger level

func (*SetLevelRequest) Descriptor

func (*SetLevelRequest) Descriptor() ([]byte, []int)

func (*SetLevelRequest) GetLevel

func (m *SetLevelRequest) GetLevel() Level

func (*SetLevelRequest) GetLoggerName

func (m *SetLevelRequest) GetLoggerName() string

func (*SetLevelRequest) ProtoMessage

func (*SetLevelRequest) ProtoMessage()

func (*SetLevelRequest) Reset

func (m *SetLevelRequest) Reset()

func (*SetLevelRequest) String

func (m *SetLevelRequest) String() string

func (*SetLevelRequest) XXX_DiscardUnknown

func (m *SetLevelRequest) XXX_DiscardUnknown()

func (*SetLevelRequest) XXX_Marshal

func (m *SetLevelRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetLevelRequest) XXX_Merge

func (m *SetLevelRequest) XXX_Merge(src proto.Message)

func (*SetLevelRequest) XXX_Size

func (m *SetLevelRequest) XXX_Size() int

func (*SetLevelRequest) XXX_Unmarshal

func (m *SetLevelRequest) XXX_Unmarshal(b []byte) error

type SetLevelResponse

type SetLevelResponse struct {
	ResponseStatus       ResponseStatus `` /* 144-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

SetLevelResponse response for setting a logger level

func (*SetLevelResponse) Descriptor

func (*SetLevelResponse) Descriptor() ([]byte, []int)

func (*SetLevelResponse) GetResponseStatus

func (m *SetLevelResponse) GetResponseStatus() ResponseStatus

func (*SetLevelResponse) ProtoMessage

func (*SetLevelResponse) ProtoMessage()

func (*SetLevelResponse) Reset

func (m *SetLevelResponse) Reset()

func (*SetLevelResponse) String

func (m *SetLevelResponse) String() string

func (*SetLevelResponse) XXX_DiscardUnknown

func (m *SetLevelResponse) XXX_DiscardUnknown()

func (*SetLevelResponse) XXX_Marshal

func (m *SetLevelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetLevelResponse) XXX_Merge

func (m *SetLevelResponse) XXX_Merge(src proto.Message)

func (*SetLevelResponse) XXX_Size

func (m *SetLevelResponse) XXX_Size() int

func (*SetLevelResponse) XXX_Unmarshal

func (m *SetLevelResponse) XXX_Unmarshal(b []byte) error

type UnimplementedLoggerServer

type UnimplementedLoggerServer struct {
}

UnimplementedLoggerServer can be embedded to have forward compatible implementations.

func (*UnimplementedLoggerServer) GetLevel added in v0.6.14

func (*UnimplementedLoggerServer) SetLevel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL