Eliminate default trace log level on Mobile (#942)

This commit is contained in:
Zoltan Papp 2023-06-09 09:55:31 +02:00 committed by GitHub
parent 1d9feab2d9
commit a0296f7839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,9 +53,6 @@ type Client struct {
// NewClient instantiate a new Client // NewClient instantiate a new Client
func NewClient(cfgFile, deviceName string, tunAdapter TunAdapter, iFaceDiscover IFaceDiscover, routeListener RouteListener) *Client { func NewClient(cfgFile, deviceName string, tunAdapter TunAdapter, iFaceDiscover IFaceDiscover, routeListener RouteListener) *Client {
lvl, _ := log.ParseLevel("trace")
log.SetLevel(lvl)
return &Client{ return &Client{
cfgFile: cfgFile, cfgFile: cfgFile,
deviceName: deviceName, deviceName: deviceName,
@ -107,6 +104,11 @@ func (c *Client) Stop() {
c.ctxCancel() c.ctxCancel()
} }
// SetTraceLogLevel configure the logger to trace level
func (c *Client) SetTraceLogLevel() {
log.SetLevel(log.TraceLevel)
}
// PeersList return with the list of the PeerInfos // PeersList return with the list of the PeerInfos
func (c *Client) PeersList() *PeerInfoArray { func (c *Client) PeersList() *PeerInfoArray {