# README
Logmanager
Table of Contents
Introduction
Logmanager is yet another Go logging library.
Installation
Install using go get
go get github.com/axiomhq/logmanager
Install from source
git clone https://github.com/axiomhq/logmanager.git
cd logmanager
make
Usage
// Simple console logger
log2console := logmanager.GetLogger("foo.bar")
log2console.Info("hello world")
log2console.Warn("it's a trap")
// Prints:
// [09:15:54.24] info [email protected] main.go:10 hello world
// [09:15:54.24] warn [email protected] main.go:11 it's a trap
Contributing
Feel free to submit PRs or to fill issues. Every kind of help is appreciated.
Before committing, make
should run without any issues.
Kindly check our Contributing guide on how to propose bugfixes and improvements, and submitting pull requests to the project.
License
© Axiom, Inc., 2021
Distributed under MIT License (The MIT License
).
See LICENSE for more information.
# Functions
GetLogger will get a logger for the specified name.
NewConsoleWriter ...
NewDiskWriter ...
NewSyslogWriter returns a writer that will send log messages to a syslog server configured with the provied network, raddr strings.
SetCustomWriters ...
SPrintCaller returns a string with information about caller.
SPrintStack will print the current stack to a returned string.
# Structs
ColorTheme ...
ConsoleWriter will write out to a console.
DiskWriter ...
DiskWriterConfig ...
Logger is a logmanager base logger.
SyslogWriter ...
# Interfaces
Writer defines something that accepts log input, it is expected to send it somewhere.
# Type aliases
Level defines the log level, from Trace to Critical.