Challenge: Secure Logging
Завдання
Swipe to start coding
Write a function that logs user actions without exposing sensitive information. Your function must ensure that no secrets or personal data are included in the logs.
- Remove any key-value pairs from the
detailsdictionary whose key matches'password','ssn','credit_card', or'secret'. - Create a log message that includes the
user_id,action, and the filtered details. - Log the message using the
loggingmodule. - Return the log message as a string.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 5
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 5.56
Challenge: Secure Logging
Свайпніть щоб показати меню
Завдання
Swipe to start coding
Write a function that logs user actions without exposing sensitive information. Your function must ensure that no secrets or personal data are included in the logs.
- Remove any key-value pairs from the
detailsdictionary whose key matches'password','ssn','credit_card', or'secret'. - Create a log message that includes the
user_id,action, and the filtered details. - Log the message using the
loggingmodule. - Return the log message as a string.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 5
single