Add additional log info for process kqchannels

This commit is contained in:
Ariel Abreu 2022-06-30 22:44:35 -04:00
parent 4f001e2a34
commit cfd5cb9999
No known key found for this signature in database
GPG Key ID: D67AE16CCEA85B70
2 changed files with 15 additions and 0 deletions

View File

@ -157,6 +157,8 @@ namespace DarlingServer {
Process& operator=(Process&&) = delete;
virtual int setup();
virtual void logToStream(Log::Stream& stream) const;
};
};

View File

@ -717,3 +717,16 @@ std::function<void()> DarlingServer::Kqchan::Process::_checkForEventsAsyncFactor
self->_checkForEventsAsync();
};
};
void DarlingServer::Kqchan::Process::logToStream(Log::Stream& stream) const {
auto proc = _targetProcess.lock();
Kqchan::logToStream(stream);
stream << ":";
if (proc) {
stream << *proc;
} else {
stream << "<null>";
}
};