Challenge: Secure Logging
Tehtävä
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.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 2. Luku 5
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 5.56
Challenge: Secure Logging
Pyyhkäise näyttääksesi valikon
Tehtävä
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.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 2. Luku 5
single