Skip to main content

At times while developing in October CMS, you will perform a step that kills the site.  Recently, I had transferred the site to production and I was working through our steps to cross check deployment.  This included reviewing the error logger plugin.  The error logger has four tabs Mailer, Slack, Syslog and Relic.  In the syslog tab, I was tweeting the facility, when on saving the change the site the following error greeted me:

[2020-10-14 08:01:29] development.ERROR: UnexpectedValueException: Unknown facility value "local66" given in /{serverPath}/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php:88
Stack trace:
#0 /{serverPath}/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php(43): Monolog\Handler\AbstractSyslogHandler->__construct('local66', '100', true)
#1 /{serverPath}/plugins/vojtasvoboda/errorlogger/Plugin.php(151): Monolog\Handler\SyslogHandler->__construct('mainSite', 'local66', '100')
#2 /{serverPath}/plugins/vojtasvoboda/errorlogger/Plugin.php(71): VojtaSvoboda\ErrorLogger\Plugin->setSyslogHandler(Object(Monolog\Logger))
#3 /{serverPath}/modules/system/classes/PluginManager.php(317): VojtaSvoboda\ErrorLogger\Plugin->boot()
#4 /{serverPath}/modules/system/classes/PluginManager.php(299): System\Classes\PluginManager->bootPlugin(Object(VojtaSvoboda\ErrorLogger\Plugin))
#5 /{serverPath}/modules/system/ServiceProvider.php(104): System\Classes\PluginManager->bootAll()
#6 [internal function]: System\ServiceProvider->boot()
#7 /{serverPath}/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#8 /{serverPath}/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#9 /{serverPath}/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(October\Rain\Foundation\Application), Array, Object(Closure))
#10 /{serverPath}/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\Container\BoundMethod::call(Object(October\Rain\Foundation\Application), Array, Array, NULL)
#11 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(792): Illuminate\Container\Container->call(Array)
#12 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\Foundation\Application->bootProvider(Object(System\ServiceProvider))
#13 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation\{closure}(Object(System\ServiceProvider), 24)
#14 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(776): array_walk(Array, Object(Closure))
#15 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()
#16 /{serverPath}/vendor/october/rain/src/Foundation/Application.php(85): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(October\Rain\Foundation\Application))
#17 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): October\Rain\Foundation\Application->bootstrapWith(Array)
#18 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\Foundation\Http\Kernel->bootstrap()
#19 /{serverPath}/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#20 /{serverPath}/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#21 {main}  

Now with the backend not operational, how to clear the cache?

There are several ways you can attempt to clean up this situation:

1. Using shell enter the following command

php artisan cache:clear

2. .htaccess file
php_flag opcache.enable Off
3. remove relevant storage file
rm -rf /{serverPath}/storage/cms/cache/*
rm -rf /{serverPath}/storage/cms/twig/*
rm -rf /{serverPath}/storage/temp/public/*
rm -rf /{serverPath}/storage/framework/cache/*

For me options 1 and 2 didn't work.  Option 3 did... more specifically the command that cleared the error was rm -rf /{serverPath}/storage/temp/public/*

 

What are the Syslog facilities

The error that I wanted to clear was through entering the wrong syslog facility description.  I had entered local66, instead of local6.  

What options are available for the syslog facility?

Facility Number Facility Description Facility Number Facility Description
0 kernel messages 12 NTP subsystem
1 user-level messages 13 log audit
2 mail system 14 log alert
3 system daemons 15 clock daemon
4 **security/authorization messages 16 local use 0 (local0)
5 messages generated internally by syslog 17 local use 1 (local1)
6 line printer subsystem 18 local use 2 (local2)
7 network news subsystem 19 local use 3 (local3)
8 UUCP subsystem 20 local use 4 (local4)
9 clock daemon 21 local use 5 (local5)
10 security/authorization messages 22 local use 6 (local6)
11 FTP daemon 23 local use 7 (local7)

Related articles

Andrew Fletcher16 Jan 2025
get IP address from terminal OSX
When troubleshooting network issues or configuring devices, knowing your IP address can be essential. Whether you're connected via Wi-Fi, Ethernet, or tethering through a mobile provider, macOS offers powerful built-in tools to quickly identify your IP address. Here's a practical guide tailored to...