zap-log

module
v0.0.0-...-0958b86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2024 License: MIT

README

Go Logger

A high-performance logger library for Go.

Installation

To install the package, run:

go get github.com/yourusername/go-logger

Usage

go get github.com/yourusername/go-logger
package main

import (
    "github.com/yourusername/go-logger"
    "go.uber.org/zap"
)

func main() {
    config := logger.LoggerConfig{
        Format:   "json",
        LogType:  "file",
        Priority: "debug",
    }
    log := logger.InitLogger(config)
    defer log.Sync()

    log.Info("This is an info message")
    log.Debug("This is a debug message")
    log.Error("This is an error message")
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL