Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 54
While developing an application following the 12-factor app methodology, which approach should be used in the application for logging?
Answer options
- A. Write a log to a file in the application directory.
- B. Write a log to a file in /var/log.
- C. Write the logs buffered to stdout.
- D. Write the logs unbuffered to stdout.
Correct answer: D
Explanation
The correct answer is D because the 12-factor app methodology emphasizes that logs should be treated as event streams and sent to stdout without buffering, which allows for real-time processing. Options A and B suggest writing logs to files, which can complicate log management and does not adhere to the 12-factor principles. Option C, while better than A and B, still involves buffered logging, which can delay log visibility.