Skip to content

ctfjx/log

// made with <3

About

This logger aims to be performant and async out of the gate.

Features

  • Log rotations
  • Async logging
  • File logging

Usage

Install into your project

go get -u github.com/LatteSec/log@latest

Use it

import "github.com/LatteSec/log"

func main() {
  defer log.Close()

  // Use it straight away with a default logger
  log.Info().Msg("Hello, World!").Send()
  log.Log(log.INFO).Msg("Hello, World!").Send()

  // or create a logger
  logger, _ := log.NewLogger().
              Name("my-logger").
              Level(log.INFO).
              Build()

  _ = logger.Start()
  logger.Info().Msg("Hello from custom logger!").Send()
  logger.Log(log.INFO).Msg("Hello from custom logger!").Send()

  // and you can register it to the global logger too!
  log.Register(logger)
}

Development

# For all the commands you will need
make help

Special Thanks

  • Waku - For the project templating
  • Img Shields - For the awesome README badges
  • Hyprland - For showing how to make beautiful READMEs
  • Hyprdots - For showing how to make beautiful READMEs

stars-graph

About

LatteSec's Golang Logger

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 2

  •  
  •