Skip to content
Snippets Groups Projects
Commit fa196f29 authored by ale's avatar ale
Browse files

Simplify the tag used when logging

Drop the runcron/ prefix in the syslog tag.
parent 39c96795
No related branches found
No related tags found
No related merge requests found
......@@ -767,10 +767,7 @@ int main(int argc, char **argv) {
if (job_name == NULL) {
job_name = basename(argv[optind]);
}
if (asprintf(&log_tag, "runcron/%s", job_name) < 0) {
fprintf(stderr, "Error: could not allocate memory\n");
exit(2);
}
log_tag = job_name;
if (log_to_syslog) {
openlog(log_tag, LOG_PID, LOG_CRON);
}
......@@ -788,6 +785,5 @@ int main(int argc, char **argv) {
export_metrics(r);
}
free(log_tag);
return r;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment