Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Parse and Summarize Log Data | Automating Everyday Engineering Tasks
Python for Automation Engineers

bookChallenge: Parse and Summarize Log Data

Task

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

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 3
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain this in simpler terms?

What are some examples related to this topic?

How does this information apply to real-world situations?

close

bookChallenge: Parse and Summarize Log Data

Swipe to show menu

Task

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

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 3
single

single

some-alt