log

package
v4.7.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogType_name = map[int32]string{
	0: "None",
	1: "Console",
	2: "File",
	3: "Event",
}
View Source
var LogType_value = map[string]int32{
	"None":    0,
	"Console": 1,
	"File":    2,
	"Event":   3,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	ErrorLogType         LogType      `` /* 132-byte string literal not displayed */
	ErrorLogLevel        log.Severity `` /* 139-byte string literal not displayed */
	ErrorLogPath         string       `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath,proto3" json:"error_log_path,omitempty"`
	AccessLogType        LogType      `` /* 135-byte string literal not displayed */
	AccessLogPath        string       `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Config) Descriptor

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

func (*Config) GetAccessLogPath

func (m *Config) GetAccessLogPath() string

func (*Config) GetAccessLogType

func (m *Config) GetAccessLogType() LogType

func (*Config) GetErrorLogLevel

func (m *Config) GetErrorLogLevel() log.Severity

func (*Config) GetErrorLogPath

func (m *Config) GetErrorLogPath() string

func (*Config) GetErrorLogType

func (m *Config) GetErrorLogType() LogType

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

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

func (*Config) XXX_Merge

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

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

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

type Instance

type Instance struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Instance is a log.Handler that handles logs.

func New

func New(ctx context.Context, config *Config) (*Instance, error)

New creates a new log.Instance based on the given config.

func (*Instance) Close

func (g *Instance) Close() error

Close implements common.Closable.Close().

func (*Instance) Handle

func (g *Instance) Handle(msg log.Message)

Handle implements log.Handler.

func (*Instance) Start

func (g *Instance) Start() error

Start implements common.Runnable.Start().

func (*Instance) Type

func (*Instance) Type() interface{}

Type implements common.HasType.

type LogType

type LogType int32
const (
	LogType_None    LogType = 0
	LogType_Console LogType = 1
	LogType_File    LogType = 2
	LogType_Event   LogType = 3
)

func (LogType) EnumDescriptor

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

func (LogType) String

func (x LogType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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