Errorln is a logging function that takes a sublogger and an arbitrary number of any arguments. This writes to configured io.Writer(s) as an error message using default formats for its operands. A new line is automatically added to the output.
(sl *SubLogger, v ...any)
| 167 | // error message using default formats for its operands. A new line is |
| 168 | // automatically added to the output. |
| 169 | func Errorln(sl *SubLogger, v ...any) { |
| 170 | mu.RLock() |
| 171 | defer mu.RUnlock() |
| 172 | if f := sl.getFields(); f != nil { |
| 173 | f.stageln(f.logger.ErrorHeader, v...) |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | // ErrorlnWithFields is a logging function that takes a sublogger, additional |
| 178 | // structured logging fields and an arbitrary number of any arguments. |