Log.php 917 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shenyang
  5. * Date: 2018/11/20
  6. * Time: 3:41 PM
  7. */
  8. namespace app\framework\Support\Facades;
  9. use app\framework\Log\SimpleLog;
  10. class Log extends \Illuminate\Support\Facades\Log
  11. {
  12. /**
  13. * @return SimpleLog
  14. */
  15. static public function order(){
  16. return app('OrderManager')->log;
  17. }
  18. static public function debug($message,$content = []){
  19. if(!is_array($content)){
  20. $content = [$content];
  21. }
  22. app('Log.debug')->add($message,$content);
  23. }
  24. static public function error($message,$content = []){
  25. if(!is_array($content)){
  26. $content = [$content];
  27. }
  28. app('Log.error')->add($message,$content);
  29. }
  30. static public function info($message,$content = []){
  31. if(!is_array($content)){
  32. $content = [$content];
  33. }
  34. app('log')->info($message,$content);
  35. }
  36. }