2024-07-03 701次浏览

Yii Logging Library package was updated with the following enhancements and new features:

  • added new static methods Logger::assertLevelIsValid() , Logger::assertLevelIsString() and Logger::assertLevelIsSupported() ;
  • added support of nested values in message templates' variables, e. g. {foo.bar} ;
  • added context providers;
  • added DateTime and DateTimeImmutable support as time in log context;
  • added Message::category() method and Message::DEFAULT_CATEGORY constant, deprecate CategoryFilter::DEFAULT in favor it;
  • added Message::trace() method;
  • added Message::time() method;
  • deprecated method Logger::validateLevel() ;
  • deprecated Logger methods setTraceLevel() and setExcludedTracePaths() in favor of context provider usage;
  • deprecated methods setCommonContext() and getCommonContext() in Target class;
  • replaced gettype() to get_debug_type() in exception messages generation;
  • changed the type of the $level parameter in the Message constructor to string ;
  • fixed error on parse messages, that contains variables that cannot cast to a string;
  • fixed error on formatting trace, when it doesn't contain "file" and "line".