func (c *ConnWriter) Init(config map[string]interface{}) error {
	conf, err := json.Marshal(config)
	if err != nil {
		return err
	}
	return json.Unmarshal(conf, c)
}
init connection writer with json config.
json config only need key "level".
package logs
import (
	"encoding/json"
	"io"
	"log"
	"net"
)
type ConnWriter struct {
	lg             *log.Logger
	innerWriter    io.WriteCloser
	ReconnectOnMsg bool   `json:"reconnectOnMsg"`
	Reconnect      bool   `json:"reconnect"`
	Net            string `json:"net"`
	Addr           string `json:"addr"`
	Level          int    `json:"level"`
}
func NewConn() LoggerInterface {
	conn := new(ConnWriter)
	conn.Level = LevelDebug
	return conn
}