selog

package module
v0.0.0-...-4ef562a Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: MIT Imports: 7 Imported by: 2

README

selog

Simple colorful logger for Go.

Installation

go get github.com/buraksekili/selog

Usage

import (
	"log"
	"os"

	"github.com/buraksekili/selog"
)

l := log.New(os.Stdout, "TEST", log.LstdFlags)
logger := selog.NewLogger(l)
logger.Success("IT WORKED %s\n", "burak")

selog

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrefix

func GetPrefix(status, loggerPrefix string) string

Types

type Selog

type Selog struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(l *log.Logger) *Selog

func (*Selog) Debug

func (s *Selog) Debug(msg string, i ...interface{})

func (*Selog) Error

func (s *Selog) Error(msg string, i ...interface{})

func (*Selog) Fatal

func (s *Selog) Fatal(msg string, i ...interface{})

func (*Selog) Info

func (s *Selog) Info(msg string, i ...interface{})

func (*Selog) Success

func (s *Selog) Success(msg string, i ...interface{})

func (*Selog) Warn

func (s *Selog) Warn(msg string, i ...interface{})

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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