Challenge: Parse and Summarize Log Data
Tâche
Swipe to start coding
Given a multiline string representing a system log, your task is to process the log and generate a summary report.
- Extract all lines from the log that contain the word "ERROR".
- Count how many times "ERROR", "WARNING", and "INFO" appear in the log.
- Return a tuple containing the counts for "ERROR", "WARNING", "INFO", and a list of the extracted error lines.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 3
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 4.76
Challenge: Parse and Summarize Log Data
Glissez pour afficher le menu
Tâche
Swipe to start coding
Given a multiline string representing a system log, your task is to process the log and generate a summary report.
- Extract all lines from the log that contain the word "ERROR".
- Count how many times "ERROR", "WARNING", and "INFO" appear in the log.
- Return a tuple containing the counts for "ERROR", "WARNING", "INFO", and a list of the extracted error lines.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 3
single