Route all loader messages to log collector (#10528)

This commit is contained in:
Jack May
2020-06-13 13:20:08 -07:00
committed by GitHub
parent e5a2c75fab
commit b6a9573748
11 changed files with 240 additions and 230 deletions

View File

@ -165,7 +165,12 @@ pub trait InvokeContext {
fn get_caller(&self) -> Result<&Pubkey, InstructionError>;
/// Get a list of built-in programs
fn get_programs(&self) -> &[(Pubkey, ProcessInstruction)];
/// Check if logging is enabled
/// Get this invocation's logger
fn get_logger(&self) -> Rc<RefCell<dyn Logger>>;
}
/// Log messages
pub trait Logger {
fn log_enabled(&self) -> bool;
/// Log a message
fn log(&mut self, message: &str);