MCPcopy Create free account
hub / github.com/Cyinx/einx / post_log

Function post_log

slog/slog_manager.go:53–73  ·  view source on GitHub ↗
(debuglv Level, is_log_file bool, name string, format string, args ...interface{})

Source from the content-addressed store, hash-verified

51var LOG_LEVEL Level = DEBUG
52
53func post_log(debuglv Level, is_log_file bool, name string, format string, args ...interface{}) {
54 if LOG_LEVEL > debuglv {
55 return
56 }
57 var msg string
58 if len(args) > 0 {
59 msg = fmt.Sprintf(format, args...)
60 } else {
61 msg = format
62 }
63
64 rec := log_pool.Get().(*LogRecord)
65
66 rec.Level = debuglv
67 rec.logfile = is_log_file
68 rec.Created = time.Now()
69 rec.Name = name
70 rec.Message = msg
71
72 _log_writer.LogWrite(rec)
73}
74
75func LogDebug(name string, format string, args ...interface{}) {
76 post_log(DEBUG, true, name, format, args...)

Callers 4

LogDebugFunction · 0.85
LogInfoFunction · 0.85
LogWarningFunction · 0.85
LogErrorFunction · 0.85

Calls 2

LogWriteMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…