Exam AD0-E103 All QuestionsBrowse all questions from this exam
Question 56

A developer wants to automatically truncate request log files once they exceed 10 MB.

Which OSGi configuration should the developer modify?

    Correct Answer: C

    The correct configuration to modify in order to automatically truncate request log files once they exceed 10 MB is the Apache Sling Logging Writer Configuration. This configuration allows the developer to set a maximum file size for log rotation by specifying a size limit with parameters such as KB, MB, or GB. Therefore, setting the log file size threshold to 10 MB will achieve the desired truncation.

Discussion
chunpinOption: C

Awnser: C Log File Threshold property of Apache Sling Logging Writer Configuration: “Controls the rotation of the log file by setting a maximum file size or a time/date schedule at which to rotate the log file. A size limit can be specified setting a pure number indicating the number of bytes or a number with a size indicator KB, MB, or GB (case is ignored). A time/date schedule can be specified as a java.util.SimpleDateFormat pattern. The default is “‘.’yyyy-MM-dd” (daily log rotation). (org.apache.sling.commons.log.file.size)”