Log.php 297 B

12345678910111213141516
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Kernel;
  4. use Hyperf\Context\ApplicationContext;
  5. use Hyperf\Logger\LoggerFactory;
  6. class Log
  7. {
  8. public static function get(string $name = 'app')
  9. {
  10. return ApplicationContext::getContainer()->get(LoggerFactory::class)->get($name);
  11. }
  12. }