mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-31 01:47:11 +03:00
Merge branch 'bug-5060'
This commit is contained in:
commit
c976f87c92
@ -445,6 +445,10 @@ module OpenNebula
|
||||
|
||||
private
|
||||
|
||||
# Maximum number of log entries per service
|
||||
# TODO: Make this value configurable
|
||||
MAX_LOG = 50
|
||||
|
||||
# @param [Logger::Severity] severity
|
||||
# @param [String] message
|
||||
def add_log(severity, message)
|
||||
@ -456,6 +460,9 @@ module OpenNebula
|
||||
:severity => severity_str,
|
||||
:message => message
|
||||
}
|
||||
|
||||
# Truncate the number of log entries
|
||||
@body['log'] = @body['log'].last(MAX_LOG)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user