code: public static function debug($message, $category = 'application')
      {
          if (YII_DEBUG) {
              static::getLogger()->log($message, Logger::LEVEL_TRACE, $category);
          }
      }
docs: Logs a debug message.
  Trace messages are logged mainly for development purpose to see
  the execution work flow of some code. This method will only log
  a message when the application is in debug mode.
  @param string|array $message the message to be logged. This can be a simple string or a more
  complex data structure, such as array.
  @param string $category the category of the message.
  @since 2.0.14