le_log.h
Go to the documentation of this file.
7 * informational, and debugging messages. These messages can be turned on or off remotely and pushed or pulled38 * By default, app processes will have their @c stdout and @c stderr redirected to the @c syslog. Each49 * connected to something like a pipe it's bulk buffered, which means a flush doesn't occur until the buffer is full.52 * the @c setlinebuf(stdout) system call can be used. Alternatively, @c fflush(stdout) can be called \63 * All of them accept printf-style arguments, consisting of a format string followed by zero or more82 * Similar to the basic macros, but these contain a conditional expression as their first parameter. If this expression equals110 * Always kills the calling process after logging the message at EMERGENCY level (never returns).138 * // Now I can go ahead and use objPtr, knowing that if it was NULL then LE_FATAL_IF() would not164 * LE_TRACE(NewShapeTraceRef, "Created %p with position (%d,%d).", shapePtr, shapePtr->x, shapePtr->y);174 * through configuration settings and runtime log control tools. See @ref c_log_controlling below.184 * The @ref le_result_t macro supports printing an error condition in a human-readable text string.225 * To enable all LE_TRACE statements tagged with the keyword "foo" in a component called "myComp"248 * Environment variables can be used to control the default log settings, taking effect immediately251 * Settings in the Log Control Daemon (applied through configuration and/or the log control tool)312 Jan 3 02:37:56 INFO | processName[pid]/componentName T=threadName | fileName.c funcName() lineNum | Message340 * If the fault action for that app's process is to reboot the target, the output location is changed to369 //--------------------------------------------------------------------------------------------------373 //--------------------------------------------------------------------------------------------------388 //--------------------------------------------------------------------------------------------------395 //--------------------------------------------------------------------------------------------------439 //--------------------------------------------------------------------------------------------------458 //--------------------------------------------------------------------------------------------------462 //--------------------------------------------------------------------------------------------------475 //--------------------------------------------------------------------------------------------------479 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------498 //--------------------------------------------------------------------------------------------------505 //--------------------------------------------------------------------------------------------------509 //--------------------------------------------------------------------------------------------------516 //--------------------------------------------------------------------------------------------------523 //--------------------------------------------------------------------------------------------------526 //--------------------------------------------------------------------------------------------------533 //--------------------------------------------------------------------------------------------------536 //--------------------------------------------------------------------------------------------------540 //--------------------------------------------------------------------------------------------------548 //--------------------------------------------------------------------------------------------------550 //--------------------------------------------------------------------------------------------------554 //--------------------------------------------------------------------------------------------------564 //--------------------------------------------------------------------------------------------------568 * Accepts printf-style arguments, consisting of a format string followed by zero or more parameters571 //--------------------------------------------------------------------------------------------------576 //--------------------------------------------------------------------------------------------------583 //--------------------------------------------------------------------------------------------------588 //--------------------------------------------------------------------------------------------------596 //--------------------------------------------------------------------------------------------------598 _le_LogData(level, dataPtr, dataLength, STRINGIZE(LE_FILENAME), _LE_LOG_FUNCTION_NAME, __LINE__)611 //--------------------------------------------------------------------------------------------------615 //--------------------------------------------------------------------------------------------------619 //--------------------------------------------------------------------------------------------------627 //--------------------------------------------------------------------------------------------------631 //--------------------------------------------------------------------------------------------------635 //--------------------------------------------------------------------------------------------------651 //--------------------------------------------------------------------------------------------------659 //--------------------------------------------------------------------------------------------------664 //--------------------------------------------------------------------------------------------------672 //--------------------------------------------------------------------------------------------------676 //--------------------------------------------------------------------------------------------------686 //--------------------------------------------------------------------------------------------------691 //--------------------------------------------------------------------------------------------------695 //--------------------------------------------------------------------------------------------------700 //--------------------------------------------------------------------------------------------------710 //--------------------------------------------------------------------------------------------------715 //--------------------------------------------------------------------------------------------------725 //--------------------------------------------------------------------------------------------------767 //--------------------------------------------------------------------------------------------------777 //--------------------------------------------------------------------------------------------------786 //--------------------------------------------------------------------------------------------------790 //--------------------------------------------------------------------------------------------------794 //--------------------------------------------------------------------------------------------------799 //--------------------------------------------------------------------------------------------------801 //--------------------------------------------------------------------------------------------------809 //--------------------------------------------------------------------------------------------------813 //--------------------------------------------------------------------------------------------------817 //--------------------------------------------------------------------------------------------------821 //--------------------------------------------------------------------------------------------------829 //--------------------------------------------------------------------------------------------------833 //--------------------------------------------------------------------------------------------------841 //--------------------------------------------------------------------------------------------------845 //--------------------------------------------------------------------------------------------------855 //--------------------------------------------------------------------------------------------------859 //--------------------------------------------------------------------------------------------------869 //--------------------------------------------------------------------------------------------------893 //--------------------------------------------------------------------------------------------------895 * The following macros are used to send log messages at different severity levels conditionally.899 * Accepts printf-style arguments, consisting of a format string followed by zero or more parameters902 //--------------------------------------------------------------------------------------------------946 //--------------------------------------------------------------------------------------------------951 * Accepts printf-style arguments, consisting of a format string followed by zero or more parameters954 //--------------------------------------------------------------------------------------------------970 //--------------------------------------------------------------------------------------------------975 * Accepts printf-style arguments, consisting of a format string followed by zero or more parameters978 //--------------------------------------------------------------------------------------------------985 //--------------------------------------------------------------------------------------------------987 * This macro does nothing if the condition is true, otherwise it logs the condition expression as990 //--------------------------------------------------------------------------------------------------995 //--------------------------------------------------------------------------------------------------997 * This macro does nothing if the condition is LE_OK (0), otherwise it logs that the expression did1000 //--------------------------------------------------------------------------------------------------1005 //--------------------------------------------------------------------------------------------------1016 //--------------------------------------------------------------------------------------------------1019 //--------------------------------------------------------------------------------------------------1028 //--------------------------------------------------------------------------------------------------1037 //--------------------------------------------------------------------------------------------------1041 * all log settings are received from the Log Control Daemon and applied to sessions in the local1044 //--------------------------------------------------------------------------------------------------1050 //--------------------------------------------------------------------------------------------------1058 //--------------------------------------------------------------------------------------------------LE_FULL_API le_log_SessionRef_t le_log_RegComponent(const char *componentNamePtr, le_log_Level_t **levelFilterPtrPtr)Definition: le_log.h:379const char * _le_log_GetErrnoCodeString(int errnoCode)Function that does the real work of translating result codes. See LE_RESULT_TXT.const char * _le_log_GetResultCodeString(le_result_t resultCode)Function that does the real work of translating result codes. See LE_RESULT_TXT.LE_FULL_API void le_log_ConnectToControlDaemon(void)Definition: le_log.h:381Emergency. A fatal error has occurred. A process is being terminated.Definition: le_log.h:383void _le_log_ExitFatal(void)Function that exits in a race-free manner -- work around glibc BZ#14333.