(log string)
| 256 | } |
| 257 | |
| 258 | func (s *kunLogStatStore) WriteFunctionLog(log string) error { |
| 259 | if s.flags.Has(flagClosed) { |
| 260 | return errReceiverClosed |
| 261 | } |
| 262 | s.appendLogbuf([]byte(log), true) |
| 263 | logfile := s.logfile |
| 264 | if logfile == nil { |
| 265 | return nil |
| 266 | } |
| 267 | l := &userlog.UserLog{ |
| 268 | Created: time.Now(), |
| 269 | TriggerType: s.triggerType, |
| 270 | RuntimeID: s.runtimeID, |
| 271 | RequestID: s.requestID, |
| 272 | Source: logSource[easyfaasSysLog], |
| 273 | Message: []byte(log), |
| 274 | UserID: s.userID, |
| 275 | FuncName: s.funcName, |
| 276 | FunctionBrn: s.funcBrn, |
| 277 | Version: s.funcVersion, |
| 278 | InvocationTime: -1, |
| 279 | MemoryUsage: -1, |
| 280 | ResponseStatus: -1, |
| 281 | Mode: "", |
| 282 | } |
| 283 | _, err := logfile.Write(l, []byte(log)) |
| 284 | return err |
| 285 | } |
| 286 | |
| 287 | type reportParameters struct { |
| 288 | InvocationTime int64 |
nothing calls this directly
no test coverage detected