(
&self, class_name: Option<&str>, function_name: &str,
)
| 52 | } |
| 53 | |
| 54 | fn hook( |
| 55 | &self, class_name: Option<&str>, function_name: &str, |
| 56 | ) -> Option<( |
| 57 | Box<crate::execute::BeforeExecuteHook>, |
| 58 | Box<crate::execute::AfterExecuteHook>, |
| 59 | )> { |
| 60 | let class_name = class_name?; |
| 61 | match &*function_name.to_uppercase() { |
| 62 | "EMERGENCY" | "ALERT" | "CRITICAL" | "ERROR" | "WARNING" | "NOTICE" | "INFO" |
| 63 | | "DEBUG" => { |
| 64 | let log_level = function_name.into(); |
| 65 | if log_level >= *PSR_LOGGING_LEVEL { |
| 66 | Some(self.hook_log_methods( |
| 67 | class_name.to_owned(), |
| 68 | function_name.to_owned(), |
| 69 | log_level, |
| 70 | )) |
| 71 | } else { |
| 72 | None |
| 73 | } |
| 74 | } |
| 75 | "LOG" => Some(self.hook_log(class_name.to_owned(), function_name.to_owned())), |
| 76 | _ => None, |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | impl Psr3Plugin { |
nothing calls this directly
no test coverage detected