MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / Warning

Method Warning

cli/pkg/common/log.go:403–435  ·  view source on GitHub ↗
(warning ...string)

Source from the content-addressed store, hash-verified

401}
402
403func (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
437func (sLog *smartIDELogStruct) WarningF(format string, args ...interface{}) {
438

Callers 15

GitCloneMethod · 0.80
GetRepositoryUrlMethod · 0.80
SparseCheckoutMethod · 0.80
CheckRemoteEnvMethod · 0.80
GitCloneMethod · 0.80
WarningFMethod · 0.80
AutoTunnelFunction · 0.80
TunnelMultipleFunction · 0.80
UpdateSSHConfigMethod · 0.80
RemoveSSHConfigMethod · 0.80
RemoveK8sFunction · 0.80
RemoveWorkspaceFunction · 0.80

Calls 4

entryptionKeyFunction · 0.85
getPrefixFunction · 0.85
SendAndReceiveFunction · 0.85
JoinMethod · 0.45

Tested by

no test coverage detected