MCPcopy Create free account
hub / github.com/apache/skywalking-php / hook_log_methods

Method hook_log_methods

src/plugin/plugin_psr3.rs:83–102  ·  view source on GitHub ↗
(
        &self, class_name: String, function_name: String, log_level: PsrLogLevel,
    )

Source from the content-addressed store, hash-verified

81impl Psr3Plugin {
82 #[instrument(skip_all)]
83 fn hook_log_methods(
84 &self, class_name: String, function_name: String, log_level: PsrLogLevel,
85 ) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) {
86 (
87 Box::new(move |request_id, execute_data| {
88 let message = Self::handle_message(execute_data.get_mut_parameter(0))?;
89 let context = Self::handle_context(execute_data.get_mut_parameter(1))?;
90 Self::handle_log(
91 class_name.clone(),
92 function_name.clone(),
93 log_level.clone(),
94 request_id,
95 message,
96 context,
97 )?;
98 Ok(Box::new(()))
99 }),
100 Noop::noop(),
101 )
102 }
103
104 #[instrument(skip_all)]
105 fn hook_log(

Callers 1

hookMethod · 0.80

Calls 1

get_mut_parameterMethod · 0.80

Tested by

no test coverage detected