(warning ...string)
| 401 | } |
| 402 | |
| 403 | func (sLog *smartIDELogStruct) Warning(warning ...string) { |
| 404 | |
| 405 | msg := strings.Join(warning, " ") |
| 406 | if len(msg) <= 0 { |
| 407 | return |
| 408 | } |
| 409 | msg = entryptionKey(msg) // 加密 |
| 410 | |
| 411 | prefix := getPrefix(zapcore.WarnLevel) |
| 412 | if isDebugLevel { |
| 413 | fmt.Println(prefix, msg) |
| 414 | } |
| 415 | if sLog.Ws_id != "" { |
| 416 | ch <- struct{}{} |
| 417 | WG.Add(1) |
| 418 | go func() { |
| 419 | SendAndReceive("business", "workspaceLog", "", "", model.WorkspaceLog{ |
| 420 | Title: "", |
| 421 | ParentId: sLog.ParentId, |
| 422 | Content: msg, |
| 423 | Ws_id: sLog.Ws_id, |
| 424 | Level: 2, |
| 425 | Type: 1, |
| 426 | StartAt: time.Now(), |
| 427 | EndAt: time.Now(), |
| 428 | }) |
| 429 | |
| 430 | defer WG.Done() |
| 431 | <-ch |
| 432 | }() |
| 433 | } |
| 434 | sugarLogger.Warn(msg) |
| 435 | } |
| 436 | |
| 437 | func (sLog *smartIDELogStruct) WarningF(format string, args ...interface{}) { |
| 438 |
no test coverage detected