t == JOB_STOP ? SD_MESSAGE_UNIT_STOPPING :
SD_MESSAGE_UNIT_RELOADING;
- log_struct(LOG_INFO,
+ log_struct_unit(LOG_INFO,
+ u->id,
MESSAGE_ID(mid),
- "UNIT=%s", u->id,
"MESSAGE=%s", buf,
NULL);
}
check_unneeded_dependencies(u);
if (ns != os && ns == UNIT_FAILED) {
- log_struct(LOG_NOTICE,
+ log_struct_unit(LOG_NOTICE,
+ u->id,
"MESSAGE=Unit %s entered failed state", u->id,
- "UNIT=%s", u->id,
NULL);
unit_trigger_on_failure(u);
}
return -ENOMEM;
b->controller = strdup(controller);
- if (!b)
+ if (!b->controller)
goto fail;
b->path = unit_default_cgroup_path(u);