# README
Logger (Internal use)
The project is intended to provide a global logger interface for all software that is developed using Go. This package uses rs/zerolog under the hood to provide a great API and best performance possible.
The project uses make
to make your life easier. If you're not familiar with Makefiles you can take a look
at this quickstart guide.
Whenever you need help regarding the available actions, just use the following command.
make help
Setup
To get your setup up and running the only thing you have to do is
make all
This will initialize a git repo, download the dependencies in the latest versions and install all needed tools. If needed code generation will be triggered in this target as well.
Test & lint
Run linting
make lint
Run tests
make test
Todo
- Add performance tests based on rs/zerolog suite.
# Functions
Ctx returns the zerolog.Logger associated with the ctx.
Debug starts a new message with debug level.
Err starts a new message with error level with err as a field if not nil or with info level if err is nil.
Error starts a new message with error level.
Fatal starts a new message with fatal level.
GetLevel is a function that returns the current logging level of the logger.
GlobalLevel is a function that returns the current global logging level.
Hook returns a logger with the h Hook.
Info starts a new message with info level.
Level creates a child logger with the minimum accepted level set to level.
Log starts a new message with no level.
No description provided by the author
Output duplicates the global logger and sets w as its output.
Panic starts a new message with panic level.
Print sends a log event using debug level and no extra field.
Printf sends a log event using debug level and no extra field.
Sample returns a logger with the s sampler.
SetGlobalLevel is a function that sets the global logging level.
Trace starts a new message with trace level.
UpdateContext updates the internal logger's context.
Warn starts a new message with warn level.
With creates a child logger with the field added to its context.
No description provided by the author
WithContext returns a copy of ctx with the receiver attached.
No description provided by the author
WithLevel starts a new message with level.
WithMaxPathParents is a function that takes an integer value and returns an Option.
No description provided by the author
WithSentry is a function that returns an option.
WithVerbosity is a function that takes an integer value and returns an option.
WithWriter is a function that takes an io.Writer and returns an option.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
# Type aliases
Option is a function that takes a pointer to a Logger and sets its options.