logger

package module
v0.0.0-...-e3efd38 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 4 Imported by: 0

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")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(config LoggerConfig) *zap.Logger

Types

type LoggerConfig

type LoggerConfig struct {
	Format   string
	LogType  string
	Priority string
}

Jump to

Keyboard shortcuts

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