namespace FIX8 { char glob_log0[max_global_filename_length] = { "global_filename_not_set.log" }; #ifdef _MSC_VER template<> f8_atomic<SingleLogger<glob_log0> *> Singleton<SingleLogger<glob_log0> >::_instance; #else template<> f8_atomic<SingleLogger<glob_log0> *> Singleton<SingleLogger<glob_log0> >::_instance = f8_atomic<SingleLogger<glob_log0> *>(); #endif template<> f8_mutex Singleton<SingleLogger<glob_log0> >::_mutex = f8_mutex(); const string Logger::_bit_names[] = { "append", "timestamp", "sequence", "compress", "pipe", "broadcast", "thread", "direction", "buffer", "inbound", "outbound" }; }
#include <f8includes.hpp> //------------------------------------------------------------------------------------------------- using namespace FIX8; using namespace std; //------------------------------------------------------------------------------------------------- namespace FIX8 { char glob_log0[max_global_filename_length] = { "global_filename_not_set.log" }; template<> f8_atomic<SingleLogger<glob_log0> *> Singleton<SingleLogger<glob_log0> >::_instance = f8_atomic<SingleLogger<glob_log0> *>(); template<> f8_mutex Singleton<SingleLogger<glob_log0> >::_mutex = f8_mutex(); const string Logger::_bit_names[] = { "append", "timestamp", "sequence", "compress", "pipe", "broadcast", "thread", "direction", "buffer" }; } //------------------------------------------------------------------------------------------------- int Logger::operator()() { unsigned received(0); for (; !_stopping; ) { LogElement *msg_ptr(0); #if (MPMC_SYSTEM == MPMC_FF) if (!_msg_queue.try_pop(msg_ptr))