Logging and Audit Trails
📖 Scenario: You work as a security analyst. Your job is to keep track of user actions on a system. This helps detect problems and keeps a record of what happened.
🎯 Goal: Create a simple logging system that records user actions with timestamps. You will build a list of logs, add a filter for important actions, and then display the filtered logs.
📋 What You'll Learn
Create a list called
user_actions with exact user action entries.Add a variable called
important_action to filter logs.Use a list comprehension to create
filtered_logs with only important actions.Print the
filtered_logs list.💡 Why This Matters
🌍 Real World
Logging user actions helps detect security issues and keeps a record for audits.
💼 Career
Security analysts and DevOps engineers use logging to monitor system activity and investigate incidents.
Progress0 / 4 steps