Fix corePKCS11 demo logging message (#1205)

* Flush demo log before demo exit in corePKCS11 demo
* Fix logging line break problem
* Flush log when there is assertion
This commit is contained in:
chinglee-iot
2024-04-15 10:27:02 +08:00
committed by GitHub
parent dd4789cdba
commit e6b4e8288f
3 changed files with 96 additions and 8 deletions

View File

@@ -50,6 +50,10 @@
/*-----------------------------------------------------------*/
extern void vPlatformStopLoggingThreadAndFlush( void );
/*-----------------------------------------------------------*/
void vAssertCalled( const char * pcFile,
uint32_t ulLine )
{
@@ -60,6 +64,10 @@ void vAssertCalled( const char * pcFile,
( void ) pcFileName;
( void ) ulLineNumber;
/* Stop the windows logging thread and flush the log buffer. This function does
* nothing if the logging is not initialized before. */
vPlatformStopLoggingThreadAndFlush();
printf( "vAssertCalled( %s, %u )\n", pcFile, ulLine );
/* Setting ulBlockVariable to a non-zero value in the debugger will allow