core: v2ray.com/core/app/log Index | Files | Directories

package log

import "v2ray.com/core/app/log"

Index

Package Files

config.pb.go errors.generated.go log.go log_creator.go

Variables

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

func RegisterHandlerCreator Uses

func RegisterHandlerCreator(logType LogType, f HandlerCreator) error

type Config Uses

type Config struct {
    ErrorLogType         LogType      `protobuf:"varint,1,opt,name=error_log_type,json=errorLogType,proto3,enum=v2ray.core.app.log.LogType" json:"error_log_type,omitempty"`
    ErrorLogLevel        log.Severity `protobuf:"varint,2,opt,name=error_log_level,json=errorLogLevel,proto3,enum=v2ray.core.common.log.Severity" json:"error_log_level,omitempty"`
    ErrorLogPath         string       `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath,proto3" json:"error_log_path,omitempty"`
    AccessLogType        LogType      `protobuf:"varint,4,opt,name=access_log_type,json=accessLogType,proto3,enum=v2ray.core.app.log.LogType" json:"access_log_type,omitempty"`
    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 Uses

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

func (*Config) GetAccessLogPath Uses

func (m *Config) GetAccessLogPath() string

func (*Config) GetAccessLogType Uses

func (m *Config) GetAccessLogType() LogType

func (*Config) GetErrorLogLevel Uses

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

func (*Config) GetErrorLogPath Uses

func (m *Config) GetErrorLogPath() string

func (*Config) GetErrorLogType Uses

func (m *Config) GetErrorLogType() LogType

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

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

func (*Config) XXX_Merge Uses

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

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

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

type HandlerCreator Uses

type HandlerCreator func(LogType, HandlerCreatorOptions) (log.Handler, error)

type HandlerCreatorOptions Uses

type HandlerCreatorOptions struct {
    Path string
}

type Instance Uses

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

Instance is a log.Handler that handles logs.

func New Uses

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

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

func (*Instance) Close Uses

func (g *Instance) Close() error

Close implements common.Closable.Close().

func (*Instance) Handle Uses

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

Handle implements log.Handler.

func (*Instance) Start Uses

func (g *Instance) Start() error

Start implements common.Runnable.Start().

func (*Instance) Type Uses

func (*Instance) Type() interface{}

Type implements common.HasType.

type LogType Uses

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

func (LogType) EnumDescriptor Uses

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

func (LogType) String Uses

func (x LogType) String() string

Directories

PathSynopsis
command

Package log imports 8 packages (graph) and is imported by 54 packages. Updated 2019-04-20. Refresh now. Tools for package owners.