woodenshark / Lightpack

Lightpack and Prismatik open repository (For support use support@lightpack.tv)
https://lightpack.tv/
GNU General Public License v3.0
205 stars 244 forks source link

Rewrite logging code in main.cpp. #2

Closed dreamer-dead closed 10 years ago

dreamer-dead commented 10 years ago

Created LogWriter class with all log-specific code. Removed unnessesary stream.flush() calls and minimized time under locked mutex. Expected no behavior change.

In future LogWriter class can be easily moved into separate .hpp\.cpp files. Then it can be tested with unit-tests.

dreamer-dead commented 10 years ago

OK, I've used cerr for log messages and ::exit for terminating the app.