Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 821 Bytes

README.md

File metadata and controls

33 lines (23 loc) · 821 Bytes

logtor (Log Creator)

logtor is a package that allows you to save log records with different outputs. You can make changes to the running application. You can log your operations according to log levels.

There are three log recorders ready-made. You can use as many loggers as you want after defining the specified functions.

Installation

go get https://github.com/Eyup-Devop/logtor

Example Usage

package main

import (
	"github.com/Eyup-Devop/logtor"
	"github.com/Eyup-Devop/logtor/creators"
	"github.com/Eyup-Devop/logtor/types"
)

func main() {
	console, _ := creators.NewBaseCreator("Console", 3, 5)

	newLogtor := logtor.NewLogtor()
	newLogtor.AddLogCreators(console)
	newLogtor.SetLogLevel(types.TRACE)
	newLogtor.LogIt(types.INFO, "Example Info")
}