sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
108 stars 63 forks source link

Logging #34

Closed tstenner closed 4 years ago

tstenner commented 4 years ago

This PR adds a logging library to liblsl.

Benefits:

An example log output looks like this

date       time         ( uptime  ) [ thread name/id ]                   file:line     v|
2019-09-03 17:05:51.002 (   7.693s) [main thread     ] stream_outlet_impl.cpp:65       2| timesync: Trying to listen at address ''
2019-09-03 17:05:51.002 (   7.693s) [main thread     ]         tcp_server.cpp:67       2| Created TCP server for outlet timesync on IPv6 port 16573
2019-09-03 17:05:51.002 (   7.693s) [main thread     ]         udp_server.cpp:36       2| timesync: Started unicast udp server 0x559bf82d41b0 at port 16573
2019-09-03 17:05:51.002 (   7.693s) [main thread     ]         udp_server.cpp:81       2| timesync: Started multicast udp server at FF02:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 port 16571
2019-09-03 17:05:51.002 (   7.693s) [main thread     ]         udp_server.cpp:81       2| timesync: Started multicast udp server at FF05:113D:6FDD:2C17:A643:FFE2:1BD1:3CD2 port 16571
2019-09-03 17:05:51.504 (   8.195s) [main thread     ]   inlet_connection.cpp:55    WARN| The stream named 'timesync' can't be recovered automatically if its provider crashes because it doesn't have a unique source ID
2019-09-03 16:54:00.744 (   8.200s) [T_timesync      ]      time_receiver.cpp:94       2| Started time receiver thread

The only minor setback is the C++11 requirement (i.e., MSVC 2015), so it'd have to wait for 1.14.