示例#1
0
// NewMain return a new instance of Main.
func NewMain() *Main {
	return &Main{
		Logger: wlog.New(os.Stderr, "[run] ", log.LstdFlags),
		Stdin:  os.Stdin,
		Stdout: os.Stdout,
		Stderr: os.Stderr,
	}
}
示例#2
0
func (s *Service) NewLogger(prefix string, flag int) *log.Logger {
	return wlog.New(s.f, prefix, flag)
}
示例#3
0
func (l TestLogService) NewLogger(prefix string, flag int) *log.Logger {
	return wlog.New(os.Stderr, prefix, flag)
}