Documentation ¶
Index ¶
- func ReceiveLogThroughPipe(receivingLogger Logger, pipe *os.File, marshalizer marshaling.Marshalizer) error
- type LogLevel
- type LogMessage
- type Logger
- type PipeLogger
- func (pipeLogger *PipeLogger) Debug(message string, args ...interface{})
- func (pipeLogger *PipeLogger) Error(message string, args ...interface{})
- func (pipeLogger *PipeLogger) Info(message string, args ...interface{})
- func (pipeLogger *PipeLogger) Trace(message string, args ...interface{})
- func (pipeLogger *PipeLogger) Warn(message string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReceiveLogThroughPipe ¶
func ReceiveLogThroughPipe(receivingLogger Logger, pipe *os.File, marshalizer marshaling.Marshalizer) error
ReceiveLogThroughPipe reads a log message from the pipe and sends it to a regular Node logger
Types ¶
type LogLevel ¶
type LogLevel uint8
LogLevel defines the priority level of a log line. Trace is the lowest priority level, Error is the highest
const ( LogTrace LogLevel = 0 LogDebug LogLevel = 1 LogInfo LogLevel = 2 LogWarning LogLevel = 3 LogError LogLevel = 4 LogNone LogLevel = 5 )
These constants are the string representation of the package logging levels.
func ParseLogLevel ¶
ParseLogLevel gets a log level from a string
type LogMessage ¶
LogMessage is a log message
type Logger ¶
type Logger interface { Trace(message string, args ...interface{}) Debug(message string, args ...interface{}) Info(message string, args ...interface{}) Warn(message string, args ...interface{}) Error(message string, args ...interface{}) }
Logger is the logger interface
func NewDefaultLogger ¶
NewDefaultLogger creates a logger
func NewPipeLogger ¶
func NewPipeLogger(level LogLevel, pipe *os.File, marshalizer marshaling.Marshalizer) Logger
NewPipeLogger creates a new pipe logger
type PipeLogger ¶
type PipeLogger struct {
// contains filtered or unexported fields
}
PipeLogger is a pipe-based logger
func (*PipeLogger) Debug ¶
func (pipeLogger *PipeLogger) Debug(message string, args ...interface{})
Debug logs
func (*PipeLogger) Error ¶
func (pipeLogger *PipeLogger) Error(message string, args ...interface{})
Error logs
func (*PipeLogger) Info ¶
func (pipeLogger *PipeLogger) Info(message string, args ...interface{})
Info logs
func (*PipeLogger) Trace ¶
func (pipeLogger *PipeLogger) Trace(message string, args ...interface{})
Trace logs
func (*PipeLogger) Warn ¶
func (pipeLogger *PipeLogger) Warn(message string, args ...interface{})
Warn logs
Click to show internal directories.
Click to hide internal directories.