Logo: Relish

  1. Sign in

Project: Indy

Finding log entries at an exact log level

  • @log_level

As an Indy user I am able to create an instance and find all logs at the various standard log levels.

Background
Given
the following log:
2000-09-07 14:07:41 INFO  MyApp - Entering application.
2000-09-07 14:07:42 DEBUG MyApp - Focusing application.
2000-09-07 14:07:43 DEBUG MyApp - Blurring application.
2000-09-07 14:07:44 WARN  MyApp - Low on Memory.
2000-09-07 14:07:45 ERROR MyApp - Out of Memory.
2000-09-07 14:07:46 INFO  MyApp - Exiting application.
Scenarios
Count of entries at specified log level
When
searching the log for the log severity INFO
Then
I expect to have found 2 log entries
Particular entry at the specified log level
When
searching the log for the log severity INFO
Then
I expect the first entry to be:
2000-09-07 14:07:41 INFO  MyApp - Entering application.
And
I expect the last entry to be:
2000-09-07 14:07:46 INFO  MyApp - Exiting application.
No entries at the specified log level
When
searching the log for the log severity SEVERE
Then
I expect to have found no log entries

Last published about 5 years ago by Burtlo.