title: How to print and view logs from Hyperledger Fabric chaincode
body: <p>I want to see logs while calling functions in my chaincode, for debugging purposes. I tried something like this:</p>
  
  <pre><code>var logger = shim.NewLogger("chaincode_example02")
  logger.Info("get_caller_data called");
  </code></pre>
  
  <p>I've viewed logs of the peer running the chaincode, but I couldn't find the above log. What am I doing wrong? </p>