func (cl *CoLog) SetHost(host string) {
	cl.mu.Lock()
	defer cl.mu.Unlock()
	cl.host = host
}
SetHost sets the logger hostname assigned to the entries
package colog
import (
	"bytes"
	"errors"
	"fmt"
	"io"
	"log"
	"os"
	"runtime"
	"sync"
	"time"
)
var std = NewCoLog(os.Stderr, "", 0)
type CoLog struct {
	mu           sync.Mutex
	host         string
	prefix       string
	minLevel     Level
	defaultLevel Level
	headers      HeaderMap
	extractor    Extractor
	formatter    Formatter
	customFmt    bool
	parseFields  bool
	fixed        Fields
	hooks        hookPool
	out          io.Writer
}
type Entry struct {
	Level   Level      
	Time    time.Time  
	Host    string     
	Prefix  string     
	File    string     
	Line    int        
	Message []byte     
	Fields  Fields     
}
type Level uint8
type LevelMap map[Level][]byte
type HeaderMap map[string]Level
type hookPool map[Level][]Hook
type Fields map[string]interface{}
const (
	unknown Level = iota
	LTrace
	LDebug
	LInfo
	LWarning
	LError
	LAlert
)
func (level Level) String() string {
	switch level {
	case LTrace:
		return "trace"
	case LDebug:
		return "debug"
	case LInfo:
		return "info"
	case LWarning:
		return "warning"
	case LError:
		return "error"
	case LAlert:
		return "alert"
	}
	return "unknown"
}
var initialMinLevel = LTrace
var initialDefaultLevel = LInfo
var defaultHeaders = HeaderMap{
	"t: ":       LTrace,
	"trc: ":     LTrace,
	"trace: ":   LTrace,
	"d: ":       LDebug,
	"dbg: ":     LDebug,
	"debug: ":   LDebug,
	"i: ":       LInfo,
	"inf: ":     LInfo,
	"info: ":    LInfo,
	"w: ":       LWarning,
	"wrn: ":     LWarning,
	"warn: ":    LWarning,
	"warning: ": LWarning,
	"e: ":       LError,
	"err: ":     LError,
	"error: ":   LError,
	"a: ":       LAlert,
	"alr: ":     LAlert,
	"alert: ":   LAlert,
	"panic: ":   LAlert,
}
func NewCoLog(out io.Writer, prefix string, flags int) *CoLog {
	cl := new(CoLog)
	cl.minLevel = initialMinLevel
	cl.defaultLevel = initialDefaultLevel
	cl.hooks = make(hookPool)
	cl.fixed = make(Fields)
	cl.headers = defaultHeaders
	cl.prefix = prefix
	cl.formatter = &StdFormatter{Flag: flags}
	cl.extractor = &StdExtractor{}
	cl.SetOutput(out)
	if host, err := os.Hostname(); err != nil {
		cl.host = host
	}
	return cl
}
func Register() {
	if !std.customFmt {
		std.formatter.SetFlags(log.Flags())
	}
	if log.Prefix() != "" && std.prefix == "" {
		std.SetPrefix(log.Prefix())
	}
	log.SetPrefix("")
	log.SetFlags(0)
	log.SetOutput(std)
}
func (cl *CoLog) AddHook(hook Hook) {
	cl.mu.Lock()
	defer cl.mu.Unlock()
	for _, l := range hook.Levels() {
		cl.hooks[l] = append(cl.hooks[l], hook)
	}
}