X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Funit.h;h=a972a313660113e2eef8aa96b71f71be8eb277da;hp=80a96e80535385f5a10b706651ef5e1feae33801;hb=e8e581bf256b8c0fbd430935af79fa0e8ee570a1;hpb=c1b6628d64e5340d905d974bb95d673a4aae60c1;ds=sidebyside diff --git a/src/core/unit.h b/src/core/unit.h index 80a96e805..a972a3136 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -569,6 +569,8 @@ UnitActiveState unit_active_state_from_string(const char *s); const char *unit_dependency_to_string(UnitDependency i); UnitDependency unit_dependency_from_string(const char *s); +/* Macros which append UNIT= or USER_UNIT= to the message */ + #define log_full_unit(level, unit, ...) log_meta_object(level, __FILE__, __LINE__, __func__, getpid() == 1 ? "UNIT=" : "USER_UNIT=", unit, __VA_ARGS__) #define log_debug_unit(unit, ...) log_full_unit(LOG_DEBUG, unit, __VA_ARGS__) #define log_info_unit(unit, ...) log_full_unit(LOG_INFO, unit, __VA_ARGS__)