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:
@@ -55,7 +55,7 @@ PipelineContextSender* pipeline_context_sender_create(Config* config, Queue* que
|
||||
return context;
|
||||
|
||||
fail:
|
||||
perror("Error initializing synchronization objects");
|
||||
log_perror("Error initializing synchronization objects");
|
||||
if (init >= 6)
|
||||
cnd_destroy(&context->condition_not_empty_loader);
|
||||
if (init >= 5)
|
||||
@@ -116,7 +116,7 @@ PipelineContextReceiver* pipeline_context_receiver_create(Config* config, Queue*
|
||||
return context;
|
||||
|
||||
fail:
|
||||
perror("Error initializing synchronization objects");
|
||||
log_perror("Error initializing synchronization objects");
|
||||
if (init >= 3)
|
||||
cnd_destroy(&context->condition_not_empty);
|
||||
if (init >= 2)
|
||||
|
||||
Reference in New Issue
Block a user