log-viewer.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. use Arcanedev\LogViewer\Contracts\Utilities\Filesystem;
  3. return [
  4. /* -----------------------------------------------------------------
  5. | Log files storage path
  6. | -----------------------------------------------------------------
  7. */
  8. 'storage-path' => storage_path('logs'),
  9. /* -----------------------------------------------------------------
  10. | Log files pattern
  11. | -----------------------------------------------------------------
  12. */
  13. 'pattern' => [
  14. 'prefix' => Filesystem::PATTERN_PREFIX, // 'laravel-'
  15. 'date' => Filesystem::PATTERN_DATE, // '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]'
  16. 'extension' => Filesystem::PATTERN_EXTENSION, // '.log'
  17. ],
  18. /* -----------------------------------------------------------------
  19. | Locale
  20. | -----------------------------------------------------------------
  21. | Supported locales :
  22. | 'auto', 'ar', 'bg', 'de', 'en', 'es', 'et', 'fa', 'fr', 'hu', 'hy', 'id', 'it', 'ja', 'ko', 'nl',
  23. | 'pl', 'pt-BR', 'ro', 'ru', 'sv', 'th', 'tr', 'zh-TW', 'zh'
  24. */
  25. 'locale' => 'auto',
  26. /* -----------------------------------------------------------------
  27. | Theme
  28. | -----------------------------------------------------------------
  29. | Supported themes :
  30. | 'bootstrap-3', 'bootstrap-4'
  31. | Make your own theme by adding a folder to the views directory and specifying it here.
  32. */
  33. 'theme' => 'remark',
  34. /* -----------------------------------------------------------------
  35. | Route settings
  36. | -----------------------------------------------------------------
  37. */
  38. 'route' => [
  39. 'enabled' => true,
  40. 'attributes' => [
  41. 'prefix' => 'admin/log-viewer',
  42. 'middleware' => env('ARCANEDEV_LOGVIEWER_MIDDLEWARE') ? explode(',', env('ARCANEDEV_LOGVIEWER_MIDDLEWARE')) : ['web', 'admin'],
  43. ],
  44. ],
  45. /* -----------------------------------------------------------------
  46. | Log entries per page
  47. | -----------------------------------------------------------------
  48. | This defines how many logs & entries are displayed per page.
  49. */
  50. 'per-page' => 30,
  51. /* -----------------------------------------------------------------
  52. | Download settings
  53. | -----------------------------------------------------------------
  54. */
  55. 'download' => [
  56. 'prefix' => 'laravel-',
  57. 'extension' => 'log',
  58. ],
  59. /* -----------------------------------------------------------------
  60. | Menu settings
  61. | -----------------------------------------------------------------
  62. */
  63. 'menu' => [
  64. 'filter-route' => 'log-viewer::logs.filter',
  65. 'icons-enabled' => true,
  66. ],
  67. /* -----------------------------------------------------------------
  68. | Icons
  69. | -----------------------------------------------------------------
  70. */
  71. 'icons' => [
  72. 'all' => 'fa-solid fa-fw fa-list-ul',
  73. 'emergency' => 'fa-solid fa-fw fa-life-ring',
  74. 'alert' => 'fa-solid fa-fw fa-bullhorn',
  75. 'critical' => 'fa-solid fa-fw fa-heart-pulse',
  76. 'error' => 'fa-solid fa-fw fa-circle-xmark',
  77. 'warning' => 'fa-solid fa-fw fa-triangle-exclamation',
  78. 'notice' => 'fa-solid fa-fw fa-circle-exclamation',
  79. 'info' => 'fa-solid fa-fw fa-circle-info',
  80. 'debug' => 'fa-solid fa-fw fa-bug',
  81. ],
  82. /* -----------------------------------------------------------------
  83. | Colors
  84. | -----------------------------------------------------------------
  85. */
  86. 'colors' => [
  87. 'levels' => [
  88. 'empty' => '#D1D1D1',
  89. 'all' => '#8A8A8A',
  90. 'emergency' => '#E62020',
  91. 'alert' => '#FF4C52',
  92. 'critical' => '#FF666B',
  93. 'error' => '#F57D1B',
  94. 'warning' => '#FCB900',
  95. 'notice' => '#589FFC',
  96. 'info' => '#28C0DE',
  97. 'debug' => '#526069',
  98. ],
  99. ],
  100. /* -----------------------------------------------------------------
  101. | Strings to highlight in stack trace
  102. | -----------------------------------------------------------------
  103. */
  104. 'highlight' => [
  105. '^#\d+',
  106. '^Stack trace:',
  107. ],
  108. ];