Trishul API MCQs with answers Page - 16

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. Which method is used to set custom log directory?

  • (A) set_dir()
  • (B) set_log_dir()
  • (C) set_logs()
  • (D) set_path()

A

Admin • 833K Points
Coach

Q. What happens if set_log_dir() is NOT called?

  • (A) Logging fails
  • (B) Logs are discarded
  • (C) Logs go to PHP error log
  • (D) Exception is thrown

A

Admin • 833K Points
Coach

Q. Which method is used to get logger instance?

  • (A) get_instance()
  • (B) create_logger()
  • (C) get_logger()
  • (D) init_logger()

A

Admin • 833K Points
Coach

Q. What parameter is passed to get_logger()?

  • (A) File path
  • (B) Class name
  • (C) Log level
  • (D) Directory

A

Admin • 833K Points
Coach

Q. Which method logs INFO level message?

  • (A) warn()
  • (B) error()
  • (C) info()
  • (D) debug()

A

Admin • 833K Points
Coach

Q. Which method is equivalent to info()?

  • (A) warn()
  • (B) log()
  • (C) error()
  • (D) write()

A

Admin • 833K Points
Coach

Q. Which log levels are supported?

  • (A) DEBUG, INFO, WARN, ERROR
  • (B) INFO, WARN, ERROR
  • (C) TRACE, DEBUG
  • (D) ERROR only

A

Admin • 833K Points
Coach

Q. Which method logs warning messages?

  • (A) warn()
  • (B) info()
  • (C) log()
  • (D) alert()

A

Admin • 833K Points
Coach

Q. Which method logs error messages?

  • (A) fail()
  • (B) warn()
  • (C) error()
  • (D) critical()

A

Admin • 833K Points
Coach

Q. What is included in each log entry?

  • (A) Only message
  • (B) Timestamp only
  • (C) Timestamp, level, class name, message
  • (D) Class name only

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