| 307 | } |
| 308 | |
| 309 | QString |
| 310 | Application::getLogText(void) |
| 311 | { |
| 312 | QString text = ""; |
| 313 | std::lock_guard<Suscan::Logger> guard(*Suscan::Logger::getInstance()); |
| 314 | |
| 315 | for (const auto &p : *Suscan::Logger::getInstance()) { |
| 316 | switch (p.severity) { |
| 317 | case SU_LOG_SEVERITY_CRITICAL: |
| 318 | text += "critical: "; |
| 319 | break; |
| 320 | |
| 321 | case SU_LOG_SEVERITY_DEBUG: |
| 322 | text += "debug: "; |
| 323 | break; |
| 324 | |
| 325 | case SU_LOG_SEVERITY_ERROR: |
| 326 | text += "error: "; |
| 327 | break; |
| 328 | |
| 329 | case SU_LOG_SEVERITY_INFO: |
| 330 | text += "info: "; |
| 331 | break; |
| 332 | |
| 333 | case SU_LOG_SEVERITY_WARNING: |
| 334 | text += "warning: "; |
| 335 | break; |
| 336 | } |
| 337 | |
| 338 | text += p.message.c_str(); |
| 339 | } |
| 340 | |
| 341 | return text; |
| 342 | } |
| 343 | |
| 344 | |
| 345 | void |
nothing calls this directly
no outgoing calls
no test coverage detected