Log.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. namespace Illuminate\Contracts\Logging;
  3. interface Log
  4. {
  5. /**
  6. * Log an alert message to the logs.
  7. *
  8. * @param string $message
  9. * @param array $context
  10. * @return void
  11. */
  12. public function alert($message, array $context = []);
  13. /**
  14. * Log a critical message to the logs.
  15. *
  16. * @param string $message
  17. * @param array $context
  18. * @return void
  19. */
  20. public function critical($message, array $context = []);
  21. /**
  22. * Log an error message to the logs.
  23. *
  24. * @param string $message
  25. * @param array $context
  26. * @return void
  27. */
  28. public function error($message, array $context = []);
  29. /**
  30. * Log a warning message to the logs.
  31. *
  32. * @param string $message
  33. * @param array $context
  34. * @return void
  35. */
  36. public function warning($message, array $context = []);
  37. /**
  38. * Log a notice to the logs.
  39. *
  40. * @param string $message
  41. * @param array $context
  42. * @return void
  43. */
  44. public function notice($message, array $context = []);
  45. /**
  46. * Log an informational message to the logs.
  47. *
  48. * @param string $message
  49. * @param array $context
  50. * @return void
  51. */
  52. public function info($message, array $context = []);
  53. /**
  54. * Log a debug message to the logs.
  55. *
  56. * @param string $message
  57. * @param array $context
  58. * @return void
  59. */
  60. public function debug($message, array $context = []);
  61. /**
  62. * Log a message to the logs.
  63. *
  64. * @param string $level
  65. * @param string $message
  66. * @param array $context
  67. * @return void
  68. */
  69. public function log($level, $message, array $context = []);
  70. /**
  71. * Register a file log handler.
  72. *
  73. * @param string $path
  74. * @param string $level
  75. * @return void
  76. */
  77. public function useFiles($path, $level = 'debug');
  78. /**
  79. * Register a daily file log handler.
  80. *
  81. * @param string $path
  82. * @param int $days
  83. * @param string $level
  84. * @return void
  85. */
  86. public function useDailyFiles($path, $days = 0, $level = 'debug');
  87. }