summaryrefslogtreecommitdiff
path: root/features/log.feature
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2009-03-11 13:25:45 -0700
committerAdam Jacob <adam@hjksolutions.com>2009-03-11 13:25:45 -0700
commita136f9823b8b0fa01da4e758e64c89bbab0036dc (patch)
tree9eece42b81546f39e6fe460e093f41d646a285c4 /features/log.feature
downloadmixlib-log-a136f9823b8b0fa01da4e758e64c89bbab0036dc.tar.gz
Initial commit
Diffstat (limited to 'features/log.feature')
-rw-r--r--features/log.feature37
1 files changed, 37 insertions, 0 deletions
diff --git a/features/log.feature b/features/log.feature
new file mode 100644
index 0000000..78a65f3
--- /dev/null
+++ b/features/log.feature
@@ -0,0 +1,37 @@
+Feature: Log output
+ In order to keep a record of application specific information
+ As a developer
+ I want to publish information through a configurable log interface
+
+ Scenario: Log a message at the debug level
+ Given a base log level of 'debug'
+ When the message 'this goes out' is sent at the 'debug' level
+ Then the regex '\[.+\] DEBUG: this goes out' should be logged
+
+ Scenario: Log a message at the info level
+ Given a base log level of 'info'
+ When the message 'this goes out' is sent at the 'info' level
+ Then the regex '\[.+\] INFO: this goes out' should be logged
+
+ Scenario: Log a message at the warn level
+ Given a base log level of 'warn'
+ When the message 'this goes out' is sent at the 'warn' level
+ Then the regex '\[.+\] WARN: this goes out' should be logged
+
+ Scenario: Log a message at the error level
+ Given a base log level of 'error'
+ When the message 'this goes out' is sent at the 'error' level
+ Then the regex '\[.+\] ERROR: this goes out' should be logged
+
+ Scenario: Log a message at the fatal level
+ Given a base log level of 'fatal'
+ When the message 'this goes out' is sent at the 'fatal' level
+ Then the regex '\[.+\] FATAL: this goes out' should be logged
+
+ Scenario: Log messages below the current threshold should not appear
+ Given a base log level of 'fatal'
+ When the message 'this goes out' is sent at the 'error' level
+ And the message 'this goes out' is sent at the 'warn' level
+ And the message 'this goes out' is sent at the 'info' level
+ And the message 'this goes out' is sent at the 'debug' level
+ Then nothing should be logged