Trishul API MCQs with answers Page - 17

Here, you will find a collection of MCQ questions on Trishul API . Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833K Points
Coach

Q. What is the format of log entry?

  • (A) LEVEL | MESSAGE
  • (B) TIMESTAMP | LEVEL | CLASS | MESSAGE
  • (C) CLASS | MESSAGE
  • (D) JSON format

A

Admin • 833K Points
Coach

Q. How are log files named when directory is set?

  • (A) log.txt
  • (B) app.log
  • (C) YYYY-MM-DD.log
  • (D) logs.json

A

Admin • 833K Points
Coach

Q. What happens if log directory does not exist?

  • (A) Error thrown
  • (B) Logs ignored
  • (C) Directory created automatically
  • (D) Fallback to root

A

Admin • 833K Points
Coach

Q. What type is returned by get_logger()?

  • (A) Logger
  • (B) LoggerFactory
  • (C) PDO
  • (D) Array

A

Admin • 833K Points
Coach

Q. What happens if invalid directory is provided?

  • (A) Ignored
  • (B) Default used
  • (C) Exception thrown
  • (D) Warning only

A

Admin • 833K Points
Coach

Q. What happens if invalid log pattern is used?

  • (A) Ignored
  • (B) Logged incorrectly
  • (C) Exception thrown
  • (D) Fallback applied

A

Admin • 833K Points
Coach

Q. Where are logs stored by default?

  • (A) logs/ folder
  • (B) Database
  • (C) PHP error log
  • (D) Memory

A

Admin • 833K Points
Coach

Q. Why is class name included in logs?

  • (A) For styling
  • (B) For debugging context
  • (C) For performance
  • (D) For UI display

A

Admin • 833K Points
Coach

Q. Which is the correct usage?

Code:
$logger = LoggerFactory::get_logger('MyClass');
  • (A) Correct
  • (B) Incorrect - missing directory
  • (C) Incorrect - wrong method
  • (D) Incorrect - wrong parameter

A

Admin • 833K Points
Coach

Q. What is the main purpose of the Response class?

  • (A) Handle routing
  • (B) Construct and send HTTP responses
  • (C) Manage database
  • (D) Handle middleware

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ