Answer the question
In order to leave comments, you need to log in
Larave 5.2 standard log file extension?
Essence of the question: Is it possible to expand the standard log in laravel 5.2 to add to it on which url the error occurred and which class with the function were called before the error (namely my class, not laravel)?
And then NOTICE constantly appears 2 times a day that there is no token, although on all pages where there is a form - it is worth it! And I can not understand where it appears.
The error itself:
[2016-12-23 06:24:00] production.NOTICE: exception 'Illuminate\Session\TokenMismatchException' in /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:67
Stack trace:
#0 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Kiberzauras\MultiLanguage\Request), Object(Closure))
#1 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#2 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#3 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#4 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#5 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Kiberzauras\MultiLanguage\Request), Object(Closure))
#6 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#7 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#8 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#9 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#10 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Kiberzauras\MultiLanguage\Request), Object(Closure))
#11 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#12 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#13 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#14 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#15 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Kiberzauras\MultiLanguage\Request), Object(Closure))
#16 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#17 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#18 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#19 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#20 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Kiberzauras\MultiLanguage\Request), Object(Closure))
#21 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#22 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#23 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#24 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#25 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#26 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Router.php(726): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#27 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Router.php(699): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Kiberzauras\MultiLanguage\Request))
#28 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Router.php(675): Illuminate\Routing\Router->dispatchToRoute(Object(Kiberzauras\MultiLanguage\Request))
#29 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(246): Illuminate\Routing\Router->dispatch(Object(Kiberzauras\MultiLanguage\Request))
#30 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#31 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#32 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#33 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Kiberzauras\MultiLanguage\Request), Object(Closure))
#34 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(136): call_user_func_array(Array, Array)
#35 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#36 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#37 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Kiberzauras\MultiLanguage\Request))
#38 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): call_user_func(Object(Closure), Object(Kiberzauras\MultiLanguage\Request))
#39 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#40 /home/a30632/public_html/myApp/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(99): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Kiberzauras\MultiLanguage\Request))
#41 /home/a30632/public_html/index.php(204): Illuminate\Foundation\Http\Kernel->handle(Object(Kiberzauras\MultiLanguage\Request))
#42 {main} {"identification":{"id":"bdb67643-ddaa-45dc-948f-036ac4ba4a80"}}
Answer the question
In order to leave comments, you need to log in
You can modify the report function in app/Exceptions/Handler.php
public function report(Exception $exception)
{
Log::info(url()->current());
parent::report($exception);
}
A "TokenMismatchException" error can occur when using an expired token.
For example, if a page with a form and a completely valid token was loaded, and then they left the computer for 2 hours and returned, filled out the form and sent it. The token is already expired and Laravel identifies it as invalid. I don't think knowing which page it happened on will help you in any way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question