Documentation
¶
Index ¶
Constants ¶
View Source
const MaxFrameSize = 1 << 20 // 1 MiB
MaxFrameSize caps the length-prefix value to prevent a malformed or malicious client from triggering arbitrarily large heap allocations. Writers (pkg/logsink) must not send payloads exceeding this limit.
Variables ¶
This section is empty.
Functions ¶
func ConvertLevelToNumber ¶
alpacon-server uses Python's logging package, which has different log levels from zerolog. This function maps zerolog log levels to Python logging levels.
func InitLogger ¶
func InitLogger()
func ParseCaller ¶
func PrettyWriter ¶
func PrettyWriter(out io.Writer, showCaller bool) zerolog.ConsoleWriter
PrettyWriter returns a zerolog.ConsoleWriter with or without caller info
Types ¶
type FtpLogger ¶
type FtpLogger struct {
// contains filtered or unexported fields
}
func NewFtpLogger ¶
func NewFtpLogger() FtpLogger
TODO: Send logs to alpamon's Logserver using a Unix domain socket
type LogServer ¶
type LogServer struct {
// contains filtered or unexported fields
}
func NewLogServer ¶
func NewLogServer(workerPool *pool.Pool, ctxManager *agent.ContextManager) *LogServer
func (*LogServer) StartLogServer ¶
func (ls *LogServer) StartLogServer()
Click to show internal directories.
Click to hide internal directories.