(args ...string)
| 283 | } |
| 284 | |
| 285 | func (sLog *smartIDELogStruct) Debug(args ...string) { |
| 286 | |
| 287 | args = RemoveDuplicatesAndEmpty(args) |
| 288 | if len(args) <= 0 { |
| 289 | return |
| 290 | } |
| 291 | |
| 292 | msg := strings.Join(args, " ") |
| 293 | msg = entryptionKey(msg) // 加密 |
| 294 | |
| 295 | prefix := getPrefix(zapcore.DebugLevel) |
| 296 | if isDebugLevel { |
| 297 | |
| 298 | if isRepeat(msg, zapcore.DebugLevel) { // 是否重复 |
| 299 | return |
| 300 | } else { |
| 301 | fmt.Println(prefix, msg) |
| 302 | } |
| 303 | |
| 304 | } |
| 305 | if sLog.Ws_id != "" { |
| 306 | ch <- struct{}{} |
| 307 | WG.Add(1) |
| 308 | go func() { |
| 309 | SendAndReceive("business", "workspaceLog", "", "", model.WorkspaceLog{ |
| 310 | Title: "", |
| 311 | ParentId: sLog.ParentId, |
| 312 | Content: msg, |
| 313 | Ws_id: sLog.Ws_id, |
| 314 | Level: 3, |
| 315 | Type: 1, |
| 316 | StartAt: time.Now(), |
| 317 | EndAt: time.Now(), |
| 318 | }) |
| 319 | |
| 320 | defer WG.Done() |
| 321 | <-ch |
| 322 | }() |
| 323 | } |
| 324 | sugarLogger.Debug(msg) |
| 325 | } |
| 326 | |
| 327 | // 输出到控制台,但是不加任何的修饰 |
| 328 | func (sLog *smartIDELogStruct) Console(args ...interface{}) { |
no test coverage detected