From f63280e9f8ff1e1191acf806798620667b1a521d Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 14 Nov 2022 18:32:52 -0500 Subject: [PATCH] cwLog.cpp : System errors now print the error number. --- cwLog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cwLog.cpp b/cwLog.cpp index b697ad5..c4719e8 100644 --- a/cwLog.cpp +++ b/cwLog.cpp @@ -162,10 +162,10 @@ void cw::log::defaultFormatter( void* cbArg, logOutputCbFunc_t outFunc, void* ou cwAssert(rcn==rcm); const char* rcStr = rcs; - const char* syFmt = "%s%s"; - int syn = snprintf(nullptr,0,syFmt,systemLabel,systemMsg); + const char* syFmt = "%s (%i) %s"; + int syn = snprintf(nullptr,0,syFmt,systemLabel,sys_errno,systemMsg); char sys[syn+1]; - int sym = snprintf(sys,syn+1,syFmt,systemLabel,systemMsg); + int sym = snprintf(sys,syn+1,syFmt,systemLabel,sys_errno,systemMsg); cwAssert(syn==sym); const char* syStr = sys;