Pango+ interview question

Implement a log class in Python. A log message includes: text, environment, severity and time (passed in as a parameter) The class should support efficient retrieval of log messages by time and/or severity and/or environment. After a while of thinking out loud, the interviewer said that retrieving by time is less important/common than the other two. At the end, the interviewer asked whether a relational database or not would be a better fit, had we wanted to save the log messages on disk, and explain why.