diff --git a/base/gdb/gdb.go b/base/gdb/gdb.go index 2274283f..cfd62bca 100644 --- a/base/gdb/gdb.go +++ b/base/gdb/gdb.go @@ -15,15 +15,15 @@ func (f *Frame) Begin(m *ice.Message, arg ...string) ice.Server { return f } func (f *Frame) Start(m *ice.Message, arg ...string) bool { - t := kit.Duration(m.Conf(TIMER, kit.Keym(TICK))) - enable := m.Conf(TIMER, kit.Keym("enable")) == ice.TRUE + t := kit.Duration(mdb.Conf(m, TIMER, kit.Keym(TICK))) + enable := mdb.Conf(m, TIMER, kit.Keym("enable")) == ice.TRUE for { select { - case <-time.Tick(t): + case <-time.Tick(t): if enable { m.Cmd(TIMER, HAPPEN) } - case s, ok := <-f.s: + case s, ok := <-f.s: if !ok { return true } diff --git a/base/log/log.go b/base/log/log.go index e793e676..9a931c3f 100644 --- a/base/log/log.go +++ b/base/log/log.go @@ -26,13 +26,13 @@ func (f *Frame) Begin(m *ice.Message, arg ...string) ice.Server { return f } func (f *Frame) Start(m *ice.Message, arg ...string) bool { + m.Option("_lock", m.PrefixKey()) for { select { case l, ok := <-f.p: if !ok { return true } - continue for _, file := range []string{m.Conf(SHOW, kit.Keys(l.l, FILE)), BENCH} { if file == "" { continue diff --git a/base/mdb/hash.go b/base/mdb/hash.go index c92bd99c..94e2ee22 100644 --- a/base/mdb/hash.go +++ b/base/mdb/hash.go @@ -167,7 +167,7 @@ func StatusHashAction(arg ...Any) ice.Actions { }, HashAction(arg...)) } func ClearHashOnExitAction() ice.Actions { - return ice.MergeActions(ice.Actions{ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { m.Conf("", HASH, "") }}}) + return ice.MergeActions(ice.Actions{ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { Conf(m, m.PrefixKey(), HASH, "") }}}) } func HashKey(m *ice.Message) string { @@ -235,7 +235,7 @@ func HashSelects(m *ice.Message, arg ...string) *ice.Message { return HashSelect(m, arg...) } func HashSelectValue(m *ice.Message, cb Any) *ice.Message { - m.OptionFields(m.Config(FIELD)) + m.OptionFields(Config(m, FIELD)) defer RLock(m, m.PrefixKey(), "")() Richs(m, m.PrefixKey(), nil, FOREACH, func(key string, value Map) { _mdb_select(m, cb, key, value, nil, nil) }) return m diff --git a/base/mdb/render.go b/base/mdb/render.go index 65957a3e..19182268 100644 --- a/base/mdb/render.go +++ b/base/mdb/render.go @@ -37,6 +37,6 @@ func RenderAction(args ...ice.Any) ice.Actions { }) } }}, - ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { m.Conf("", HASH, "") }}, + ice.CTX_EXIT: {Hand: func(m *ice.Message, arg ...string) { Conf(m, m.PrefixKey(), HASH, "") }}, }) } diff --git a/type.go b/type.go index c64bf736..ae6cf3c5 100644 --- a/type.go +++ b/type.go @@ -527,7 +527,7 @@ func (m *Message) Confi(key string, sub string) int { } func (m *Message) Confv(arg ...Any) (val Any) { if m.Spawn().Warn(Info.Important && m.Option("_lock") == "") { - m.Debug("what lock %s %s", m.PrefixKey(), m.FormatStack(1, 100)) + m.Warn(true, "what unsafe lock", m.PrefixKey(), m.FormatStack(1, 100)) } run := func(conf *Config) { if len(arg) == 1 {