| 104 | { |
| 105 | public: |
| 106 | ConsoleLogger(Level level) |
| 107 | { |
| 108 | level_ = level; |
| 109 | //std::ios_base::unitbuf causes automatic flushing which access |
| 110 | //thread local variable via std::uncaught_exception(). |
| 111 | //This causes deadlock with ocl-icd until its recent update. |
| 112 | //Accessing TLS has a slight performance penalty. |
| 113 | //log() always flush the ostream so unitbuf is unnecessary anyway. |
| 114 | std::nounitbuf(std::cerr); |
| 115 | } |
| 116 | virtual ~ConsoleLogger() {} |
| 117 | virtual void log(Level level, const std::string &message) |
| 118 | { |
nothing calls this directly
no outgoing calls
no test coverage detected