func (w *ConsoleWriter) Close() error {
	w.File = nil
	return nil
}
Close sets its File to nil.
package golog
import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"sort"
	"sync"
	"time"
)
const (
	fileFlag      = os.O_WRONLY | os.O_CREATE | os.O_APPEND
	fileMode      = 0644
	flushDuration = time.Millisecond * 100
	rotateByDateFormat = "-20060102.log"    
	rotateByHourFormat = "-2006010215.log"  
)
const (
	RotateByDate RotateDuration = iota
	RotateByHour
)
var bufferSize = 1024 * 1024 * 4
type RotateDuration uint8
type DiscardWriter struct {
	io.Writer
}
func NewDiscardWriter() *DiscardWriter {
	return &DiscardWriter{Writer: ioutil.Discard}
}
func (w *DiscardWriter) Close() error {
	w.Writer = nil
	return nil
}
type ConsoleWriter struct {
	*os.File  
}
func NewConsoleWriter(f *os.File) *ConsoleWriter {
	return &ConsoleWriter{File: f}
}
func NewStdoutWriter() *ConsoleWriter {
	return NewConsoleWriter(os.Stdout)
}
func NewStderrWriter() *ConsoleWriter {
	return NewConsoleWriter(os.Stderr)
}