Bird
0
0

You want to log detailed error information but keep debug mode off for security. How can you achieve this in Laravel?

hard📝 Conceptual Q9 of 15
Laravel - Configuration and Environment
You want to log detailed error information but keep debug mode off for security. How can you achieve this in Laravel?
AEnable debug mode only in production environment
BKeep <code>APP_DEBUG=false</code> and configure logging channels to capture errors
CDisable both debug and logging in <code>.env</code>
DSet <code>APP_DEBUG=true</code> and disable error logging
Step-by-Step Solution
Solution:
  1. Step 1: Understand difference between debug and logging

    Debug mode controls error display; logging controls error recording.
  2. Step 2: Configure logging with debug off

    You can keep debug off to hide errors from users but still log details for developers.
  3. Final Answer:

    Keep APP_DEBUG=false and configure logging channels to capture errors -> Option B
  4. Quick Check:

    Debug off + logging on = secure error tracking [OK]
Quick Trick: Use logging for errors, debug off for security [OK]
Common Mistakes:
  • Confusing debug mode with logging
  • Turning debug on in production
  • Disabling logging and debug together

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes