Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2018 Changes in this version + const Core + const Debug + const Detail + const Error + const Info + const MLOGJSON + const Ridiculousness + const Warn + var ErrUnkownMLogFormat = errors.New("unknown mlog format") + var MLogStringToFormat = map[string]mlogFormatT + func AddLogSystem(sys LogSystem) + func ColorBlue(s string) (coloredString string) + func ColorGreen(s string) (coloredString string) + func ColorMagenta(s string) (coloredString string) + func ColorRed(s string) (coloredString string) + func ColorYellow(s string) (coloredString string) + func CreateMLogFile(t time.Time) (f *os.File, filename string, err error) + func Flush() + func GetMLogDir() string + func GetMLogFormat() mlogFormatT + func GetMLogRegistryActive() map[mlogComponent]*Logger + func GetMLogRegistryAvailable() map[mlogComponent][]*MLogT + func MLogRegisterActive(component mlogComponent) + func MLogRegisterAvailable(name string, lines []*MLogT) mlogComponent + func MLogRegisterComponentsFromContext(s string) error + func MlogEnabled() bool + func Reset() + func SetMLogDir(str string) + func SetMLogFormat(format mlogFormatT) + func SetMLogFormatFromString(formatString string) error + func SetMlogEnabled(b bool) + type EthChainNewHead struct + BlockHash string + BlockNumber *big.Int + BlockPrevHash string + ChainHeadHash string + func (l *EthChainNewHead) EventName() string + type EthChainReceivedNewBlock struct + BlockHash string + BlockNumber *big.Int + BlockPrevHash string + ChainHeadHash string + RemoteId string + func (l *EthChainReceivedNewBlock) EventName() string + type EthMinerNewBlock struct + BlockHash string + BlockNumber *big.Int + BlockPrevHash string + ChainHeadHash string + func (l *EthMinerNewBlock) EventName() string + type EthTxReceived struct + RemoteId string + TxHash string + func (l *EthTxReceived) EventName() string + type JsonLog interface + EventName func() string + type JsonLogger struct + Coinbase string + func NewJsonLogger() *JsonLogger + func (logger *JsonLogger) LogJson(v JsonLog) + type LogEvent struct + Ts utctime8601 + type LogLevel uint32 + const DebugDetailLevel + const DebugLevel + const ErrorLevel + const InfoLevel + const Silence + const WarnLevel + type LogMsg interface + Level func() LogLevel + type LogStarting struct + ClientString string + ProtocolVersion int + func (l *LogStarting) EventName() string + type LogSystem interface + GetLogger func() *log.Logger + LogPrint func(LogMsg) + func BuildNewMLogSystem(datadir string, logFile string, logLevel int, flags int, withTimestamp bool) LogSystem + func New(datadir string, logFile string, logLevel int, flags int) LogSystem + func NewJSONsystem(datadir string, logFile string) LogSystem + func NewJsonLogSystem(writer io.Writer) LogSystem + type Logger struct + func NewLogger(tag string) *Logger + func (l *Logger) SendFormatted(format mlogFormatT, level LogLevel, msg *MLogT, c mlogComponent) + func (logger *Logger) DebugDetailf(format string, v ...interface{}) + func (logger *Logger) DebugDetailln(v ...interface{}) + func (logger *Logger) Debugf(format string, v ...interface{}) + func (logger *Logger) Debugln(v ...interface{}) + func (logger *Logger) Errorf(format string, v ...interface{}) + func (logger *Logger) Errorln(v ...interface{}) + func (logger *Logger) Fatalf(format string, v ...interface{}) + func (logger *Logger) Fatalln(v ...interface{}) + func (logger *Logger) GetTag() string + func (logger *Logger) Infof(format string, v ...interface{}) + func (logger *Logger) Infoln(v ...interface{}) + func (logger *Logger) Sendf(level LogLevel, format string, v ...interface{}) + func (logger *Logger) Sendln(level LogLevel, v ...interface{}) + func (logger *Logger) Warnf(format string, v ...interface{}) + func (logger *Logger) Warnln(v ...interface{}) + type MLogDetailT struct + Key string + Owner string + Value interface{} + func (m *MLogDetailT) AsDocumentation() *MLogDetailT + func (m *MLogDetailT) EventName() string + type MLogSystem struct + func NewMLogSystem(writer io.Writer, flags int, level LogLevel, withTimestamp bool) *MLogSystem + func (m *MLogSystem) GetLogLevel() LogLevel + func (m *MLogSystem) GetLogger() *log.Logger + func (m *MLogSystem) LogPrint(msg LogMsg) + func (m *MLogSystem) NewFile() io.Writer + type MLogT struct + Description string + Details []MLogDetailT + Receiver string + Subject string + Verb string + func (m *MLogT) AssignDetails(detailVals ...interface{}) *MLogT + func (m *MLogT) EventName() string + func (m *MLogT) FormatDocumentation(cmp mlogComponent) (out string) + func (m *MLogT) FormatJSON(c mlogComponent) []byte + func (m *MLogT) FormatJSONExample(c mlogComponent) []byte + func (m *MLogT) FormatKV() (out string) + func (m *MLogT) FormatPlain() (out string) + func (m *MLogT) MarshalJSON(c mlogComponent) ([]byte, error) + func (msg *MLogT) Send(c mlogComponent) + type P2PConnected struct + NumConnections int + RemoteAddress string + RemoteId string + RemoteVersionString string + func (l *P2PConnected) EventName() string + type P2PDisconnected struct + NumConnections int + RemoteId string + func (l *P2PDisconnected) EventName() string + type StdLogSystem struct + func NewStdLogSystem(writer io.Writer, flags int, level LogLevel) *StdLogSystem + func (t *StdLogSystem) GetLogLevel() LogLevel + func (t *StdLogSystem) GetLogger() *log.Logger + func (t *StdLogSystem) LogPrint(msg LogMsg) + func (t *StdLogSystem) SetLogLevel(i LogLevel)