mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
add some
This commit is contained in:
parent
d3001524f2
commit
7b21b28b98
@ -148,7 +148,14 @@ func _dream_check(m *ice.Message, name string) string {
|
|||||||
p := path.Join(ice.USR_LOCAL_WORK, name)
|
p := path.Join(ice.USR_LOCAL_WORK, name)
|
||||||
if pp := path.Join(p, ice.VAR_LOG_ICE_PID); nfs.Exists(m, pp) {
|
if pp := path.Join(p, ice.VAR_LOG_ICE_PID); nfs.Exists(m, pp) {
|
||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
if pid := m.Cmdx(nfs.CAT, pp, kit.Dict(ice.MSG_USERROLE, aaa.TECH)); pid != "" && nfs.Exists(m, "/proc/"+pid) {
|
pid := m.Cmdx(nfs.CAT, pp, kit.Dict(ice.MSG_USERROLE, aaa.TECH))
|
||||||
|
if pid == "" {
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
if !kit.HasPrefix(m.Cmdx(nfs.CAT, "/proc/"+pid+"/cmdline"), kit.Path("bin/ice.bin"), kit.Path(p, "bin/ice.bin")) {
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
if nfs.Exists(m, "/proc/"+pid) {
|
||||||
m.Info("already exists %v", pid)
|
m.Info("already exists %v", pid)
|
||||||
} else if gdb.SignalProcess(m, pid) {
|
} else if gdb.SignalProcess(m, pid) {
|
||||||
m.Info("already exists %v", pid)
|
m.Info("already exists %v", pid)
|
||||||
|
8
logs.go
8
logs.go
@ -52,11 +52,8 @@ func (m *Message) join(arg ...Any) (string, []Any) {
|
|||||||
return kit.Join(list, SP), meta
|
return kit.Join(list, SP), meta
|
||||||
}
|
}
|
||||||
func (m *Message) log(level string, str string, arg ...Any) *Message {
|
func (m *Message) log(level string, str string, arg ...Any) *Message {
|
||||||
if !strings.Contains(Info.Make.Domain, "debug=true") {
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
if m.Option(LOG_DISABLE) == TRUE {
|
if m.Option(LOG_DISABLE) == TRUE {
|
||||||
// return m
|
return m
|
||||||
}
|
}
|
||||||
args, traceid := []Any{}, ""
|
args, traceid := []Any{}, ""
|
||||||
for _, v := range arg {
|
for _, v := range arg {
|
||||||
@ -68,6 +65,9 @@ func (m *Message) log(level string, str string, arg ...Any) *Message {
|
|||||||
}
|
}
|
||||||
_source := logs.FileLineMeta(3)
|
_source := logs.FileLineMeta(3)
|
||||||
kit.If(Info.Log != nil, func() { Info.Log(m, m.FormatPrefix(traceid), level, logs.Format(str, append(args, _source)...)) })
|
kit.If(Info.Log != nil, func() { Info.Log(m, m.FormatPrefix(traceid), level, logs.Format(str, append(args, _source)...)) })
|
||||||
|
if !strings.Contains(Info.Make.Domain, "debug=true") {
|
||||||
|
return m
|
||||||
|
}
|
||||||
prefix, suffix := "", ""
|
prefix, suffix := "", ""
|
||||||
if Info.Colors {
|
if Info.Colors {
|
||||||
switch level {
|
switch level {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user