mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
M #-: Log messages to VM log (#1339)
Bring back behaviour from one-5.12
This commit is contained in:
parent
82faaeab4b
commit
accdc228ca
@ -292,7 +292,7 @@ private:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static void _log(std::unique_ptr<vm_msg_t> msg);
|
||||
void _log(std::unique_ptr<vm_msg_t> msg);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -123,7 +123,7 @@ int VirtualMachineManager::start()
|
||||
bind(&VirtualMachineManager::_resize, this, _1));
|
||||
|
||||
register_action(VMManagerMessages::LOG,
|
||||
&VirtualMachineManager::_log);
|
||||
bind(&VirtualMachineManager::_log, this, _1));
|
||||
|
||||
string error;
|
||||
if ( DriverManager::start(error) != 0 )
|
||||
|
@ -858,7 +858,14 @@ void VirtualMachineManager::_resize(unique_ptr<vm_msg_t> msg)
|
||||
|
||||
void VirtualMachineManager::_log(unique_ptr<vm_msg_t> msg)
|
||||
{
|
||||
NebulaLog::log("VMM", log_type(msg->status()[0]), msg->payload());
|
||||
if (msg->oid() < 0)
|
||||
{
|
||||
NebulaLog::log("VMM", log_type(msg->status()[0]), msg->payload());
|
||||
}
|
||||
else if (auto vm = vmpool->get_ro(msg->oid()))
|
||||
{
|
||||
vm->log("VMM", log_type(msg->status()[0]), msg->payload());
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
Loading…
x
Reference in New Issue
Block a user