holzhacker

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

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 7 Imported by: 0

README

Holzhacker

Holzhacker is a logger for go. It's almost just a configuration for lumberjack.

Example

This example creates a log file at ~/logs/PROGRAM_NAME/filename.log.

package main

import 	"github.com/waldreiter/holzhacker"

func main() {
	myLog := holzhacker.Create("filename")

	myLog.Print("Hello")
	myLog.Printf("1 + 2 = %d", 1+2)
	myLog.Fatal("This is the end and we logged it.")
}

Command line options for developing

With the command line argument -log all log messages are duplicated to stdout.

Licence

MIT.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(fileName string) *log.Logger

Create creates a logger with the specified filename

Types

This section is empty.

Jump to

Keyboard shortcuts

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