| 
1 | 1 | // Copyright (c) Jeevanandam M (https://github.com/jeevatkm)  | 
2 |  | -// go-aah/log source code and usage is governed by a MIT style  | 
 | 2 | +// aahframework.org/log source code and usage is governed by a MIT style  | 
3 | 3 | // license that can be found in the LICENSE file.  | 
4 | 4 | 
 
  | 
5 |  | -// Package log implements a simple, flexible, non-blocking logger.  | 
6 |  | -// It supports `console`, `file` (rotation by daily, size, lines).  | 
7 |  | -// It also has a predefined 'standard' Logger accessible through helper  | 
8 |  | -// functions `Error{f}`, `Warn{f}`, `Info{f}`, `Debug{f}`, `Trace{f}`,  | 
9 |  | -// `Print{f,ln}`, `Fatal{f,ln}`, `Panic{f,ln}` which are easier to use than creating  | 
10 |  | -// a Logger manually. Default logger writes to standard error and prints log  | 
11 |  | -// `Entry` details as per `DefaultPattern`.  | 
 | 5 | +// Package log simple logger and provides capabilities to fulfill application  | 
 | 6 | +// use cases. It supports two receivers `console` and `file` and extensible  | 
 | 7 | +// by interface and Hook.  | 
12 | 8 | //  | 
13 |  | -// aah log package can be used as drop-in replacement for standard go logger  | 
14 |  | -// with features.  | 
 | 9 | +// Also provides standard logger crossover binding (drop-in replacement  | 
 | 10 | +// for standard go logger) for unified logging.  | 
15 | 11 | //  | 
16 | 12 | // 	log.Info("Welcome ", "to ", "aah ", "logger")  | 
17 | 13 | // 	log.Infof("%v, %v, %v", "simple", "flexible", "logger")  | 
@@ -107,7 +103,17 @@ type (  | 
107 | 103 | 		WithFields(fields Fields) Loggerer  | 
108 | 104 | 		WithField(key string, value interface{}) Loggerer  | 
109 | 105 | 
 
  | 
 | 106 | +		// Level Info  | 
 | 107 | +		IsLevelInfo() bool  | 
 | 108 | +		IsLevelError() bool  | 
 | 109 | +		IsLevelWarn() bool  | 
 | 110 | +		IsLevelDebug() bool  | 
 | 111 | +		IsLevelTrace() bool  | 
 | 112 | +		IsLevelFatal() bool  | 
 | 113 | +		IsLevelPanic() bool  | 
 | 114 | + | 
110 | 115 | 		// For standard logger drop-in replacement  | 
 | 116 | +		ToGoLogger() *slog.Logger  | 
111 | 117 | 		Print(v ...interface{})  | 
112 | 118 | 		Printf(format string, v ...interface{})  | 
113 | 119 | 		Println(v ...interface{})  | 
 | 
0 commit comments