Method
hook_log_methods
(
&self, class_name: String, function_name: String, log_level: PsrLogLevel,
)
Source from the content-addressed store, hash-verified
| 81 | impl 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( |
Tested by
no test coverage detected