mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-02 06:18:33 +00:00
add log
This commit is contained in:
@@ -36,12 +36,15 @@ type Config struct {
|
||||
|
||||
//Init init kafak client
|
||||
func Init() {
|
||||
log.Info("start connect kafka....")
|
||||
content, err := ioutil.ReadFile("./plugins/kafka/kafka.json")
|
||||
if err != nil {
|
||||
log.Fatal("Read config file error: ", zap.Error(err))
|
||||
}
|
||||
// log.Info(string(content))
|
||||
|
||||
log.Info("end connect kafka....")
|
||||
|
||||
err = json.Unmarshal(content, &config)
|
||||
if err != nil {
|
||||
log.Fatal("Unmarshal config file error: ", zap.Error(err))
|
||||
|
||||
Reference in New Issue
Block a user