Skip to content

Logger provides a structured and extensible logging solution for Go applications, leveraging the power of Logrus and OpenTelemetry for enhanced traceability and context-rich logging. Designed to be simple yet powerful, this package is ideal for applications that require detailed logging with contextual information.

License

Notifications You must be signed in to change notification settings

smarter-day/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger

Go

Logger is a Go-based logging library designed to provide structured and efficient logging capabilities. It leverages popular libraries like Logrus and OpenTelemetry to offer advanced logging features and tracing support.

Table of Contents

Features

  • Structured logging with Logrus
  • OpenTelemetry tracing support
  • Easy integration with Go applications
  • Configurable logging levels

Installation

To install Logger, ensure you have Go installed and run the following command:

go get github.com/smarter-day/logger

Usage

Here's a basic example of how to use Logger in your Go application:

package main

import (
	"context"
	"errors"
	"github.com/sirupsen/logrus"
	"github.com/smarter-day/logger"
)

func main() {
	log := logger.Log(context.Background()).SetLevel(logrus.TraceLevel)
	log.WithValues("key", "value").Info("This is an info message")
	log.WithError(errors.New("some error")).Error("This is an error message")
}

For more detailed usage and configuration options, please refer to the documentation within the codebase.

Contributing

We welcome contributions to Logger!

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Logger provides a structured and extensible logging solution for Go applications, leveraging the power of Logrus and OpenTelemetry for enhanced traceability and context-rich logging. Designed to be simple yet powerful, this package is ideal for applications that require detailed logging with contextual information.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages