Configuration

The default configuration of peer logging is set to the level INFO, but this level can be controlled in the following ways:

  1. A command line option logging level. This option overrides default configurations, shown as follows:
peer node start --logging-level=error  

Note that any module or chaincode can be configured through the command line option, as shown in the following snippet:

 peer node start --logging-level=chaincode=error:main=info
  1. The default logging level can also be defined with an environment variable CORE_LOGGING_LEVEL, as shown in the following snippet:
peer0.org1.example.com:
environment:
- CORE_LOGGING_LEVEL=error
  1. A configuration attribute in the core.yml file, defining the configuration of a network can also be used with the following code:
logging:
level: info
  1. The core.yml file also allows you to configure logging levels for specific modules, such as for the chaincode or the format of messages, as shown in the following snippet:
 chaincode: 
   logging: 
         level:  error 
         shim:   warning  

More detail on the various configuration options are provided in the comments of the core.yml file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.89.30