Categorygithub.com/JoyZF/zlog
repositorypackage
0.0.2
Repository: https://github.com/joyzf/zlog.git
Documentation: pkg.go.dev

# README

zlog

a golang log package base on https://github.com/marmotedu/gopractise-demo/tree/main/log/cuslog

功能特性

  • debug level
  • debug path
  • debug filename
  • format
  • facade
  • division
  • clean

快速开始

go get -u github.com/JoyZF/zlog
package main

import "github.com/JoyZF/zlog"

func main() {
    New(WithServiceName("test"),
        WithStdLevel(DebugLevel),
        WithFormatter(&JsonFormatter{}),
        WithOutputPath("./logs/", "app.log"),
        WithCleaner(&Clean{
            Interval: 24 * time.Hour,
            Reserve:  7 * 24 * time.Hour,
    }))
    Error("this is a error log")
}