Add logging levels for unit tests
Add logging levels for the mock environment for unit tests. Values map to a string name instead of an integer like in the normal environment.
This commit is contained in:
parent
c00903505b
commit
d5a3197262
|
@ -106,6 +106,15 @@ local smr_mock_env = {
|
|||
end),
|
||||
http_response_cookie = spy.new(function(req,name,value) req.cookies = {[name] = value} end),
|
||||
log = spy.new(function(priority, message) --[[print(string.format("[LOG %q]: %s",priority,message))]] end),
|
||||
--Logging:
|
||||
LOG_DEBUG = "debug",
|
||||
LOG_INFO = "info",
|
||||
LOG_NOTICE = "notice",
|
||||
LOG_WARNING = "warning",
|
||||
LOG_ERR = "error",
|
||||
LOG_CRIT = "critical",
|
||||
LOG_ALERT = "alert",
|
||||
LOG_EMERG = "emergency",
|
||||
sha3 = spy.new(function(message) return "digest" end),
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue