clog

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 4 Imported by: 0

README

simple color log

Install

The package is fully go-getable, so, just type

go get github.com/rosbit/color-log

to install.

Usage
package main

import (
  "github.com/rosbit/color-log"
)

func main() {
	clog.Info("info message")
	clog.Infof("%s", "info message")
	clog.Warn("warn message")
	clog.Warnf("%s", "warn message")
	clog.Error("error message")
	clog.Errorf("%s", "error message")
}
Test

test

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(format string, args ...interface{})

func SetOutput added in v0.0.2

func SetOutput(w io.Writer)

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(format string, args ...interface{})

Types

type ColorLogger

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

func NewColorLogger

func NewColorLogger(l *log.Logger) *ColorLogger

func (*ColorLogger) Error

func (cl *ColorLogger) Error(args ...interface{})

func (*ColorLogger) Errorf

func (cl *ColorLogger) Errorf(format string, args ...interface{})

func (*ColorLogger) Info

func (cl *ColorLogger) Info(args ...interface{})

func (*ColorLogger) Infof

func (cl *ColorLogger) Infof(format string, args ...interface{})

func (*ColorLogger) SetOutput added in v0.0.2

func (cl *ColorLogger) SetOutput(w io.Writer)

func (*ColorLogger) Warn

func (cl *ColorLogger) Warn(args ...interface{})

func (*ColorLogger) Warnf

func (cl *ColorLogger) Warnf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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