You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey guys I am using supervisor with horizon and putting the logs of the horizon into a horizon.log into the logs directory. Whatever I did it couldn't read the log contents and then by digging I realized the LogTypeRegistrar doesn't guess the type from file name correctly for the horizon logs and then the guessing also doesn't see it as a horizon log. I have made a customLogTypeRegistrar like this :
public function guessTypeFromFileName(LogFile $file): ?string
{
if ($this->isPossiblyLaravelLogFile($file->name)) {
return LogType::LARAVEL;
} elseif (str_contains($file->name, 'horizon')) {
return LogType::HORIZON;
} elseif (str_contains($file->name, 'php-fpm')) {
return LogType::PHP_FPM;
} elseif (str_contains($file->name, 'access')) {
return LogType::HTTP_ACCESS;
} elseif (str_contains($file->name, 'postgres')) {
return LogType::POSTGRES;
} elseif (str_contains($file->name, 'redis')) {
return LogType::REDIS;
} elseif (str_contains($file->name, 'supervisor')) {
return LogType::SUPERVISOR;
}
return null;
} and register it into the AppServiceProvider. This works just fine now so I guess a minor bug? the version I am using is v3.18.0
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys I am using supervisor with horizon and putting the logs of the horizon into a horizon.log into the logs directory. Whatever I did it couldn't read the log contents and then by digging I realized the LogTypeRegistrar doesn't guess the type from file name correctly for the horizon logs and then the guessing also doesn't see it as a horizon log. I have made a customLogTypeRegistrar like this :
public function guessTypeFromFileName(LogFile $file): ?string
{
if ($this->isPossiblyLaravelLogFile($file->name)) {
return LogType::LARAVEL;
} elseif (str_contains($file->name, 'horizon')) {
return LogType::HORIZON;
} elseif (str_contains($file->name, 'php-fpm')) {
return LogType::PHP_FPM;
} elseif (str_contains($file->name, 'access')) {
return LogType::HTTP_ACCESS;
} elseif (str_contains($file->name, 'postgres')) {
return LogType::POSTGRES;
} elseif (str_contains($file->name, 'redis')) {
return LogType::REDIS;
} elseif (str_contains($file->name, 'supervisor')) {
return LogType::SUPERVISOR;
}
Beta Was this translation helpful? Give feedback.
All reactions