diff --git a/client/agent.go b/client/agent.go index db5288f..14aff78 100644 --- a/client/agent.go +++ b/client/agent.go @@ -121,7 +121,7 @@ func (agent *Agent) sendSyncPluginRequest(p types.Plugin) error { // 发送主机配置信息 func (agent *Agent) register() error { - lg.Debug("send host config %v", agent.hostcfg) + lg.Debug("send host config %+v", agent.hostcfg) return agent.cfc.AsyncWritePacket( tcp.NewDefaultPacket( types.MsgAgentRegister, diff --git a/common/types/plugin.go b/common/types/plugin.go index f9cc500..bc2b086 100644 --- a/common/types/plugin.go +++ b/common/types/plugin.go @@ -42,7 +42,7 @@ func (plugin *Plugin) Decode(data []byte) error { } func (plugin Plugin) String() string { - return fmt.Sprintf("{id:%d, name:%s, path:%s, args:%s, interval:%d, timeout:%d, checksum:%s}", + return fmt.Sprintf(`{"id":%d, "name":"%s", "path":"%s", "args":"%s", "interval":%d, "timeout":%d, "checksum":"%s"}`, plugin.ID, plugin.Name, plugin.Path,