dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts@v1.0.2/clients/logger/README.md (about) 1 # README # 2 This package contains the logging client written in the Go programming language. The logging client is used by Go services or other Go code to log messages to STDOUT. 3 4 ### How To Use ### 5 To use the logging client package you first need to import the library into your project: 6 ``` 7 import "dev.azure.com/aidainnovazione0090/DeviceManager/_git/go-mod-core-contracts/clients/logging" 8 ``` 9 To send a log message to STDOUT, you first need to create a LoggingClient with desired Log Level and then you can send log messages (indicating the log level of the message using one of the various log function calls). 10 ``` 11 loggingClient = logger.NewClient(internal.CoreDataServiceKey,configuration.Writable.LogLevel) 12 13 loggingClient.Info("Something interesting") 14 loggingClient.Infof("Starting %s %s ", internal.CoreDataServiceKey, edgex.Version) 15 loggingClient.Errorf("Something bad happened: %s", err.Error()) 16 ``` 17 Log messages can be logged as Info, Debug, Trace, Warn, or Error