update: better pool logging

This commit is contained in:
ngn
2024-08-07 01:49:29 +03:00
parent db537fdc14
commit 67dc67bf68
2 changed files with 32 additions and 27 deletions

View File

@ -143,8 +143,10 @@ int main(int argc, char *argv[]) {
}
while (NULL != pool) {
info(_("%s: loading the pool"), pool->name);
if (NULL == pool->host) {
error(_("Hostname not specified for pool, skipping: %s"), pool->name);
error(_("%s: hostname not specified for pool, skipping"), pool->name);
goto end_ctx;
}
@ -152,16 +154,15 @@ int main(int argc, char *argv[]) {
sprintf(url, "mptp://%s", pool->host);
if (!file_canread(pool->dir)) {
error(_("Failed access the pool directory of %s: %s"), pool->name, pool->dir);
error(_("%s: failed access the pool directory (%s)"), pool->name, pool->dir);
goto end_ctx;
}
if (NULL == lm_ctx_pool_add(&ctx, pool->name, url, pool->dir)) {
error(_("Failed to add pool to the list: %s"), lm_strerror());
error(_("%s: failed to add pool to the list (%s)"), pool->name, lm_strerror());
goto end_ctx;
}
info(_("%s: loaded the pool"), pool->name);
pool = pool->next;
}