Log only if causer_type is not null #857
Answered
by
Gummibeer
incoming-th
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
Gummibeer
Mar 4, 2021
Replies: 2 comments
-
You can disable logging for a whole runtime or single callbacks/code snippets. #661 would also be a solution to your problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Gummibeer
-
Hi @MickaelTH ! I have come up with this solution, specifying an early "empty" return at if (Auth::user() === null) {
return LogOptions::defaults()
->dontSubmitEmptyLogs();
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can disable logging for a whole runtime or single callbacks/code snippets.
https://spatie.be/docs/laravel-activitylog/v3/advanced-usage/disabling-logging
#661 would also be a solution to your problem.