refactor: standardize error reporting on the log module

- Add log_perror() helper (context + strerror(errno)) to the log module
- Replace all bare perror() calls with log_perror() so errors are routed
  through the unified logger (stderr sink + optional --log-file sink)
- Convert fprintf(stderr, "Error:/Warning: ...") in client code to
  log_message(); raw fprintf kept only for progress/stats output
This commit is contained in:
2026-08-30 14:06:48 +02:00
parent ae95211a05
commit 6d82967c68
16 changed files with 86 additions and 73 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ void handler(int file_descriptor) {
if (receiver_created)
writer_created = thrd_create(&writer, write_thread, context) == thrd_success;
if (!receiver_created || !writer_created) {
perror("Error creating Threads");
log_perror("Error creating Threads");
if (receiver_created) {
mtx_lock(&context->mutex);
atomic_store(&context->cancelled, true);