Added hex logging back again.
Added it back in in AsyncQueue
This commit is contained in:
17
logv2.c
17
logv2.c
@ -15,6 +15,7 @@
|
||||
#include <lld_str.h>
|
||||
#include <lld.h>
|
||||
#include <dynstring.h>
|
||||
#include <hexString.h>
|
||||
/*==============================================================================
|
||||
some static fields which control log file rotation
|
||||
===============================================================================*/
|
||||
@ -456,6 +457,22 @@ void LogTS(struct timeval *tv, unsigned int severity, unsigned int subsystem,con
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/*----------------------------------------------------------------------------*/
|
||||
void LogHex(struct timeval*tv, unsigned int severity, unsigned int subsystem,
|
||||
char *buffer, int bufferLength)
|
||||
{
|
||||
char subText[30], timeStamp[256], *hexData;
|
||||
|
||||
formatSubsystem(subsystem,subText,sizeof(subText));
|
||||
formatTimeStamp(tv, timeStamp,sizeof(timeStamp),0);
|
||||
|
||||
hexData = bytesToHexString((uint8_t *)buffer,(size_t)bufferLength);
|
||||
|
||||
if(hexData != NULL){
|
||||
LogInternal((char *)timeStamp, severity, subText,hexData);
|
||||
free(hexData);
|
||||
}
|
||||
}
|
||||
/*----------------------------------------------------------------------------*/
|
||||
void Log(unsigned int severity, const char *subsystem,const char *format,...)
|
||||
|
Reference in New Issue
Block a user