Within Hyperledger Fabric, there is an API method that goes by the name shim.ChaincodeStubInterface. Using this API method, you can specify events during the invocation of chaincode. Further, you can register to the event hub for getting those events.
The API method can be called as:
SetEvent(name string, payload byte) error
Note: SetEvent allows the chaincode to set an event on the response to the proposal to be included as part of a transaction. The event will be available within the transaction in the committed block regardless of the validity of the transaction.