Categorygithub.com/go-pckg/pine
modulepackage
0.5.5
Repository: https://github.com/go-pckg/pine.git
Documentation: pkg.go.dev

# README

Pine

Opinionated logging library for Go.

Installation

go get -u github.com/go-pckg/pine

Getting Started

Simple Logging Example

package main

import (
    "github.com/go-pckg/pine"
)

func main() {
	logger := pine.New()

	logger.Info("hello world")
}

// Output: 2022-08-11T08:48:09+12:00 INF hello

Error Logging

package main

import (
	"errors"
	
    "github.com/go-pckg/pine"
)

func main() {
	logger := pine.New()

	err := errors.New("oops")
	logger.Error("we have a problem", pine.Err(err))
}

// Output: 2022-08-11T08:48:09+12:00 ERR we have a problem error=oops

Extending Logger Fields

package main

import (
    "github.com/go-pckg/pine"
)

func main() {
	logger := pine.New(pine.Fields(pine.Int("i", 1)))
	newLogger := logger.With(pine.String("s1", "A"))
	
	newLogger.Debug("hello", pine.String("s2", "B"))
}

// Output: 2022-08-11T08:48:09+12:00 DBG hello i=1 s1=A s2=B

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
nolint:revive,stylecheck.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author
Entry
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author