0
0
HLDsystem_design~20 mins

Logging strategies in HLD - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Logging Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Log Levels

Which log level is most appropriate for recording detailed information useful for diagnosing problems during development but too verbose for production?

ADEBUG
BINFO
CWARN
DERROR
Attempts:
2 left
💡 Hint

Think about the level that provides the most detailed information for developers.

💻 Command Output
intermediate
2:00remaining
Log Rotation Command Output

What is the output of running the command logrotate -d /etc/logrotate.conf on a Linux system?

HLD
logrotate -d /etc/logrotate.conf
AStarts the logrotate daemon in debug mode
BRotates logs immediately and deletes old logs
CShows syntax errors in the logrotate configuration file
DSimulates log rotation and shows what would be done without making changes
Attempts:
2 left
💡 Hint

The -d flag is for debug mode without actual changes.

Configuration
advanced
2:00remaining
Configuring Centralized Logging

Which configuration snippet correctly sets up a syslog client to forward all logs to a remote server at 192.168.1.100 on UDP port 514?

A*.* 192.168.1.100:514
B*.* @@192.168.1.100:514
C*.* @192.168.1.100:514
D*.* :192.168.1.100:514
Attempts:
2 left
💡 Hint

Single '@' means UDP, double '@@' means TCP in syslog forwarding.

Troubleshoot
advanced
2:00remaining
Troubleshooting Missing Logs

A developer notices that application logs are missing after configuring a new logging agent. Which of the following is the most likely cause?

AThe logging agent is running but lacks permission to read the log files
BThe application is not generating any logs
CThe logging agent is configured to write logs locally instead of forwarding
DThe system clock is set incorrectly
Attempts:
2 left
💡 Hint

Check file permissions for the logging agent.

Best Practice
expert
2:00remaining
Best Practice for Log Retention Policy

What is the best practice for setting a log retention policy in a production environment to balance storage use and compliance?

ADelete logs immediately after processing to save space
BRetain logs for a defined period based on compliance requirements, then archive or delete
CKeep all logs indefinitely to ensure full audit trail
DOnly keep error logs and discard info and debug logs
Attempts:
2 left
💡 Hint

Consider legal and operational needs when deciding retention time.