logging

package
v0.0.0-...-b731181 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger = &LoggerController{}
)

Functions

This section is empty.

Types

type Action

type Action byte
const (
	ACTION_LOGIN Action = iota
	ACTION_SELECT_SERVER
	ACTION_CREATE_CHARACTER
	ACTION_DELETE_CHARACTER
	ACTION_START_GAME
	ACTION_UPGRADE_ITEM
	ACTION_PRODUCTION
	ACTION_ADVANCED_FUSION
	ACTION_DISMANTLE
	ACTION_EXTRACTION
	ACTION_TRADE
	ACTION_BUY_SALE_ITEM
	ACTION_BUY_CONS_ITEM
	ACTION_CLAIM_CONS_ITEM
)

type Log

type Log struct {
	Action      Action    `json:"action,omitempty"`
	CharacterID string    `json:"character_id,omitempty"`
	Date        time.Time `json:"date,omitempty"`
	ID          string    `json:"id,omitempty"`
	Message     string    `json:"message,omitempty"`
	UserID      string    `json:"user_id,omitempty"`
}

type LoggerController

type LoggerController struct{}

func (*LoggerController) Log

func (l *LoggerController) Log(action Action, characterID int, message, userID string)

func (*LoggerController) StartLogging

func (l *LoggerController) StartLogging()

Jump to

Keyboard shortcuts

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