[][src]Trait concordium_std::HasLogger

pub trait HasLogger {
    pub fn init() -> Self;
pub fn log_bytes(&mut self, event: &[u8]); pub fn log<S: Serial>(&mut self, event: &S) { ... } }

Objects which can serve as loggers.

Logging functionality can be used by smart contracts to record events that might be of interest to external parties. These events are not used on the chain, and cannot be observed by other contracts, but they are stored by the node, and can be queried to provide information to off-chain actors.

Required methods

pub fn init() -> Self[src]

Initialize a logger.

pub fn log_bytes(&mut self, event: &[u8])[src]

Log the given bytes as-is.

Loading content...

Provided methods

pub fn log<S: Serial>(&mut self, event: &S)[src]

Log a serializable event by serializing it with a supplied serializer.

Loading content...

Implementors

impl HasLogger for Logger[src]

#Implementations of the logger.

impl HasLogger for LogRecorder[src]

Loading content...