mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
- Proper process termination:
if interrupted with CTRL+C blocking socket calls will return with -1. Each device should call FairMQDevice::Shutdown() before ending the running state to close open sockets, otherwise the interrupt call itself will block. - FIX: Update number of received messages for FairMQFileSink. - Add ability to poll on outputs for FairMQPoller.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
8cd120aef4
commit
0a610926a1
@@ -32,14 +32,6 @@ FairMQLogger::~FairMQLogger()
|
||||
|
||||
std::ostringstream& FairMQLogger::Log(int type)
|
||||
{
|
||||
timestamp_t tm = get_timestamp();
|
||||
timestamp_t ms = tm / 1000.0L;
|
||||
timestamp_t s = ms / 1000.0L;
|
||||
std::time_t t = s;
|
||||
// std::size_t fractional_seconds = ms % 1000;
|
||||
char mbstr[100];
|
||||
std::strftime(mbstr, 100, "%H:%M:%S", std::localtime(&t));
|
||||
|
||||
string type_str;
|
||||
switch (type)
|
||||
{
|
||||
@@ -61,6 +53,14 @@ std::ostringstream& FairMQLogger::Log(int type)
|
||||
break;
|
||||
}
|
||||
|
||||
timestamp_t tm = get_timestamp();
|
||||
timestamp_t ms = tm / 1000.0L;
|
||||
timestamp_t s = ms / 1000.0L;
|
||||
std::time_t t = s;
|
||||
// std::size_t fractional_seconds = ms % 1000;
|
||||
char mbstr[100];
|
||||
std::strftime(mbstr, 100, "%H:%M:%S", std::localtime(&t));
|
||||
|
||||
os << "[\033[01;36m" << mbstr << "\033[0m]"
|
||||
<< "[" << type_str << "]"
|
||||
<< " ";
|
||||
|
Reference in New Issue
Block a user