NewFileLogger creates a logger that outputs to a file with the given level.
(level Level, logFile string)
| 151 | |
| 152 | // NewFileLogger creates a logger that outputs to a file with the given level. |
| 153 | func NewFileLogger(level Level, logFile string) (*Logger, error) { |
| 154 | config := &Config{ |
| 155 | Level: level, |
| 156 | LogToFile: true, |
| 157 | LogFile: logFile, |
| 158 | } |
| 159 | |
| 160 | return NewLogger(config) |
| 161 | } |
| 162 | |
| 163 | // NewDualLogger creates a logger that outputs to both stdout and a file. |
| 164 | func NewDualLogger(level Level, logFile string) (*Logger, error) { |