logging

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 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 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)
	// Sets debug mode to debug logging package
	SetDebug(ctx context.Context, in *SetDebugModeRequest, opts ...grpc.CallOption) (*SetDebugModeResponse, 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)
	// Sets debug mode to debug logging package
	SetDebug(context.Context, *SetDebugModeRequest) (*SetDebugModeResponse, 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 SetDebugModeRequest

type SetDebugModeRequest struct {
	Debug                bool     `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SetDebugModeRequest enable/disable debug mode of the logger

func (*SetDebugModeRequest) Descriptor

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

func (*SetDebugModeRequest) GetDebug

func (m *SetDebugModeRequest) GetDebug() bool

func (*SetDebugModeRequest) ProtoMessage

func (*SetDebugModeRequest) ProtoMessage()

func (*SetDebugModeRequest) Reset

func (m *SetDebugModeRequest) Reset()

func (*SetDebugModeRequest) String

func (m *SetDebugModeRequest) String() string

func (*SetDebugModeRequest) XXX_DiscardUnknown

func (m *SetDebugModeRequest) XXX_DiscardUnknown()

func (*SetDebugModeRequest) XXX_Marshal

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

func (*SetDebugModeRequest) XXX_Merge

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

func (*SetDebugModeRequest) XXX_Size

func (m *SetDebugModeRequest) XXX_Size() int

func (*SetDebugModeRequest) XXX_Unmarshal

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

type SetDebugModeResponse

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

SetDebugModeResponse response for setting debug mode of a logger

func (*SetDebugModeResponse) Descriptor

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

func (*SetDebugModeResponse) GetResponseStatus

func (m *SetDebugModeResponse) GetResponseStatus() ResponseStatus

func (*SetDebugModeResponse) ProtoMessage

func (*SetDebugModeResponse) ProtoMessage()

func (*SetDebugModeResponse) Reset

func (m *SetDebugModeResponse) Reset()

func (*SetDebugModeResponse) String

func (m *SetDebugModeResponse) String() string

func (*SetDebugModeResponse) XXX_DiscardUnknown

func (m *SetDebugModeResponse) XXX_DiscardUnknown()

func (*SetDebugModeResponse) XXX_Marshal

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

func (*SetDebugModeResponse) XXX_Merge

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

func (*SetDebugModeResponse) XXX_Size

func (m *SetDebugModeResponse) XXX_Size() int

func (*SetDebugModeResponse) XXX_Unmarshal

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

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) SetDebug

func (*UnimplementedLoggerServer) SetLevel

Jump to

Keyboard shortcuts

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