Documentation
¶
Index ¶
- Constants
- func GetLevelLogName(level int) (lv string)
- func OutputHandlerConsole(ps *PushLogs)
- func ParsingLogs(ps *PushLogs, opt ParsingOption) (raw string)
- func TimeStringDateOnly(dur time.Time) (format string)
- func TimeStringTimeOnly(dur time.Time) (format string)
- func TimeStringWitLongDate(dur time.Time) (format string)
- func TimeStringWithDate(dur time.Time) (format string)
- func TimeToString(s time.Time) (ts string)
- type LogStore
- func (rm *LogStore) ClearLogs(id string, ts []int64)
- func (rm *LogStore) Count() int64
- func (rm *LogStore) LoadAll(lid string, start int64, limit int) (value []LogsValue)
- func (rm *LogStore) RemoveByID(lid string)
- func (rm *LogStore) Reset()
- func (rm *LogStore) Store(printWhenStore bool, key string, value interface{})
- type Logger
- func (cc *Logger) AlwaysShow(level int, msg string) *Logger
- func (cc *Logger) CreateHash(key string) string
- func (cc *Logger) Debug(msg string) *Logger
- func (cc *Logger) Error(err error) *Logger
- func (cc *Logger) GenerateUUID() string
- func (cc *Logger) MakeID() string
- func (cc *Logger) Notice(msg string) *Logger
- func (cc *Logger) Output(ps *PushLogs) *Logger
- func (cc *Logger) Quit(err error) error
- func (cc *Logger) SetLevel(ps int) *Logger
- func (cc *Logger) Success(msg string) *Logger
- func (cc *Logger) Warning(msg string) *Logger
- type LogsMap
- type LogsValue
- type ParsingOption
- type PushLogs
- type TimeString
Constants ¶
View Source
const ( // LOGDEBUG - LOGDEBUG = iota // LOGWARNING - LOGWARNING // LOGERROR - LOGERROR // LOGSUCCESS - LOGSUCCESS // LOGNOTICE - LOGNOTICE )
View Source
const ( // LEVELDEBUG - LEVELDEBUG = iota // LEVELWARNING - LEVELWARNING // LEVELERROR - LEVELERROR // LEVELNOTICE - LEVELNOTICE )
Variables ¶
This section is empty.
Functions ¶
func TimeStringDateOnly ¶
TimeStringDateOnly -
func TimeStringTimeOnly ¶
TimeStringTimeOnly -
func TimeStringWitLongDate ¶
TimeStringWitLongDate -
func TimeStringWithDate ¶
TimeStringWithDate -
Types ¶
type LogStore ¶
type LogStore struct { Counting int64 OnNewLogs func(value interface{}) sync.RWMutex // contains filtered or unexported fields }
LogStore -
func (*LogStore) LoadAll ¶
LoadAll -
type PushLogs ¶
type PushLogs struct { ID string `json:"id"` Origin string `json:"origin"` Name string `json:"name"` Time time.Time `json:"time"` Level int `json:"level"` LongFile string `json:"longFile"` ShortFile string `json:"shortFile"` LineNumber int `json:"lineNumber"` Message string `json:"message"` }
PushLogs -
type TimeString ¶
TimeString -
func (*TimeString) WithLongDate ¶
func (cc *TimeString) WithLongDate(sp, sp2 string) *TimeString
WithLongDate -
func (*TimeString) WithMilliSecond ¶
func (cc *TimeString) WithMilliSecond() *TimeString
WithMilliSecond -
Click to show internal directories.
Click to hide internal directories.