Re: Chaincode logs


Santiago Figueroa Lorenzo
 

 Thanks for the response,

Regarding log storage for monitoring, do you know of any projects that are in this direction to contribute?

Regards,

Santiago.

On Thu, Feb 11, 2021 at 10:15 AM Matthew White <WHITEMAT@...> wrote:
Hello;
 
Each chaincode language uses a 'natural-to-the-language' logging library, eg java.util.Logging or winston.  The user's implementation likewise can hook into these libraries. 
For a typical K8S deployment the logs will be written to STDOUT to be picked up the tooling of your choice.  
 
There's no in-built mechanism to store the logs or hashes on ledger..  Though that it self could be coded in a separate chaincode. 
 
 
Regards, Matthew.
Matthew B White  IBM Blockchain Solutions Architect
 
Email me at WHITEMAT@...
Find me on StackOverflow, and generally at  calanais.me.uk
 
Note: restricted availability for meetings 14:30 to 17:00 UK Tuesday 
IBM United Kingdom Limited, Hursley Park, Winchester, Hampshire, SO21 2JN

"The wrong answers are the ones you go looking for when the right answers stare you in the face"
 
 
 
----- Original message -----
From: "Santiago Figueroa Lorenzo" <santiagofigueroalorenzo@...>
Sent by: fabric@...
To: fabric@...
Cc:
Subject: [EXTERNAL] [Hyperledger Fabric] Chaincode logs
Date: Wed, Feb 10, 2021 8:47 PM
 
Hi Fabric experts,

I am attempting to develop a methodology to retrieve logs from the chaincode, in order to visualize in Kibana through ELK infrastructure. At the moment, I am retrieving chaincode logs using the logrus (https://github.com/sirupsen/logrus) library. As part of the log is included relevant information such as channel id, chaincode name, method implemented and the type of log (information, error, etc). For instance:

image.png
 
In this regards, I have two questions:

1. Is there another more efficient way to retrieve logs?

2. Although the information at the time of retrieval is reliable (from chaincode container), with this method, once the data are in transit to Kibana I would have no way to trust on this data. Is there some mechanism, similar to what Ethereum does with its events, that allows to leave some mark in the ledger for these logs?


Thanks in advance,

Santiago.
 
 
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Join fabric@lists.hyperledger.org to automatically receive all group messages.