@@ -98,6 +98,7 @@ import (
9898	"github.com/spf13/cobra" 
9999	"github.com/spf13/viper" 
100100	"google.golang.org/grpc" 
101+ 	"gopkg.in/yaml.v2" 
101102)
102103
103104const  (
@@ -185,6 +186,23 @@ func (c custodianLauncherAdapter) Stop(ccid string) error {
185186}
186187
187188func  serve (args  []string ) error  {
189+ 	logger .Infof ("Starting %s" , version .GetInfo ())
190+ 
191+ 	// Info logging for peer config, includes core.yaml settings and environment variable overrides 
192+ 	allSettings  :=  viper .AllSettings ()
193+ 	settingsYaml , err  :=  yaml .Marshal (allSettings )
194+ 	if  err  !=  nil  {
195+ 		return  err 
196+ 	}
197+ 	logger .Infof ("Peer config with combined core.yaml settings and environment variable overrides:\n %s" , settingsYaml )
198+ 
199+ 	// Debug logging for peer environment variables 
200+ 	logger .Debugf ("Environment variables:" )
201+ 	envVars  :=  os .Environ ()
202+ 	for  _ , envVar  :=  range  envVars  {
203+ 		logger .Debug (envVar )
204+ 	}
205+ 
188206	// currently the peer only works with the standard MSP 
189207	// because in certain scenarios the MSP has to make sure 
190208	// that from a single credential you only have a single 'identity'. 
@@ -201,9 +219,7 @@ func serve(args []string) error {
201219	// and was racy with respect to initialization of gRPC clients and servers. 
202220	grpc .EnableTracing  =  true 
203221
204- 	logger .Infof ("Starting %s" , version .GetInfo ())
205- 
206- 	//obtain coreConfiguration 
222+ 	// obtain coreConfiguration 
207223	coreConfig , err  :=  peer .GlobalConfig ()
208224	if  err  !=  nil  {
209225		return  err 
0 commit comments