- Remove fixed args number: use now Variadic Macros!

This commit is contained in:
2024-08-09 01:29:11 +02:00
parent d8dcc30b70
commit c2c4a1f7ff
3 changed files with 14 additions and 78 deletions

View File

@@ -57,11 +57,11 @@ void demo_function( void);
/*----------------------------------------------------------------------------*/
void Demo_Function( char *Name_Ptr)
{
LG_LOG_TRACE_1( LGD_LOG_LEVEL_DEFAULT, "Starting [%s]...", Name_Ptr);
LG_LOG_TRACE( LGD_LOG_LEVEL_DEFAULT, "Starting [%s]...", Name_Ptr);
LG_STACK_TRACE( LGD_LOG_LEVEL_DEFAULT);
LG_LOG_TRACE_1( LGD_LOG_LEVEL_DEFAULT, "Completed [%s]!", Name_Ptr);
LG_LOG_TRACE( LGD_LOG_LEVEL_DEFAULT, "Completed [%s]!", Name_Ptr);
}
@@ -84,10 +84,10 @@ int main( int argc, char **argv)
}
else
{
LG_LOG_TRACE_1( LGD_LOG_LEVEL_DEFAULT, "This is an trace message #: (%d)", 1);
LG_LOG_INFO_1( "This is an info message #: (%d)", 2);
LG_LOG_WARNING_1( "This is an warning message #: (%d)", 3);
LG_LOG_ERROR_1( "This is an error message #: (%d)", 4);
LG_LOG_TRACE( LGD_LOG_LEVEL_DEFAULT, "This is an trace message #: (%d)", 1);
LG_LOG_INFO( "This is an info message #: (%d)", 2);
LG_LOG_WARNING( "This is an warning message #: (%d)", 3);
LG_LOG_ERROR( "This is an error message #: (%d)", 4);
Demo_Function( "Demo_Function");