camLog

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogComponent

type LogComponent struct {
	component.Component
	// contains filtered or unexported fields
}

log components

func (*LogComponent) Init

func (comp *LogComponent) Init(configI camStatics.ComponentConfigInterface)

on App init

func (*LogComponent) Record

func (comp *LogComponent) Record(level camStatics.LogLevel, title string, content string) error

func (*LogComponent) Start

func (comp *LogComponent) Start()

on App start

func (*LogComponent) Stop

func (comp *LogComponent) Stop()

before App destroy

type LogComponentConfig

type LogComponentConfig struct {
	component.ComponentConfig

	// print log level
	// Binary switch used.
	// constant defined in constant.go and cam.constant.go
	PrintLevel camStatics.LogLevel
	// write log level
	// Binary switch used
	// constant defined in constant.go and cam.constant.go
	WriteLevel camStatics.LogLevel
	// log file max size
	// When the log file exceeds this size, a new file will be created. Old file will be renamed
	FileMaxSize int64
	// log prefix
	Tag string
	// log flag
	//
	// See: log.Flag
	//  Ldate         = 1 << iota     // the date in the local time zone: 2009/01/23
	//  Ltime                         // the time in the local time zone: 01:23:23
	//  Lmicroseconds                 // microsecond resolution: 01:23:23.123123.  assumes Ltime.
	//  Llongfile                     // full file name and line number: /a/b/c/d.go:23
	//  Lshortfile                    // final file name element and line number: d.go:23. overrides Llongfile
	//  LUTC                          // if Ldate or Ltime is set, use UTC rather than the local time zone
	//  Lmsgprefix                    // move the "prefix" from the beginning of the line to before the message
	//  LstdFlags     = Ldate | Ltime // initial values for the standard logger
	Flag int
}

func NewLogConfig

func NewLogConfig() *LogComponentConfig

Jump to

Keyboard shortcuts

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