Modify errorlog initialisation to add separate default value
This commit is contained in:
1 parent
7e68cf7ea6
commit
6b80b0cfb9
3 files changed
+12
-7
No files matched your search
@@ -41,7 +41,8 @@
|
||||
#include "osiUnistd.h"
|
||||
|
||||
|
||||
#define MIN_BUFFER_SIZE 1280
|
||||
#define MIN_BUFFER_SIZE 2560
|
||||
#define DEFAULT_MAX_MSG_SIZE 512
|
||||
#define MIN_MESSAGE_SIZE 256
|
||||
#define MAX_MESSAGE_SIZE 0x00ffffff
|
||||
|
||||
@@ -608,7 +609,7 @@ int errlogInit2(int bufsize, int maxMsgSize)
|
||||
|
||||
int errlogInit(int bufsize)
|
||||
{
|
||||
return errlogInit2(bufsize, MIN_MESSAGE_SIZE);
|
||||
return errlogInit2(bufsize, DEFAULT_MAX_MSG_SIZE);
|
||||
}
|
||||
|
||||
void errlogFlush(void)
|
||||
|
||||
@@ -205,18 +205,22 @@ LIBCOM_API int eltc(int yesno);
|
||||
LIBCOM_API int errlogSetConsole(FILE *stream);
|
||||
|
||||
/**
|
||||
* Can be used to initialize the error logging system with a larger buffer. The default buffer size is 1280 bytes.
|
||||
* Can be used to initialize the error logging system with a larger buffer. The default buffer size is 2560 bytes.
|
||||
*
|
||||
* \param bufsize The desired buffer size
|
||||
*
|
||||
* \since UNRELEASED the default buffer size is 2560.
|
||||
*/
|
||||
LIBCOM_API int errlogInit(int bufsize);
|
||||
|
||||
/**
|
||||
* errlogInit2 can be used to initialize the error logging system with a larger buffer and maximum message size.
|
||||
* The default buffer size is 1280 bytes, and the default maximum message size is 256.
|
||||
* The default buffer size is 2560 bytes, and the default maximum message size is 512.
|
||||
*
|
||||
* \param bufsize The desired buffer size
|
||||
* \param maxMsgSize The desired max message size
|
||||
*
|
||||
* \since UNRELEASED The default buffer size is 2560 and the default maximum message size is 512.
|
||||
*/
|
||||
LIBCOM_API int errlogInit2(int bufsize, int maxMsgSize);
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ static const iocshArg * const errlogInitArgs[1] = {&errlogInitArg0};
|
||||
static const iocshFuncDef errlogInitFuncDef = {
|
||||
"errlogInit",1,errlogInitArgs,
|
||||
"Initialize error log client buffer size\n"
|
||||
" bufSize - size of circular buffer (default = 1280 bytes)\n"
|
||||
" bufSize - size of circular buffer (default = 2560 bytes)\n"
|
||||
};
|
||||
static void errlogInitCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
@@ -282,8 +282,8 @@ static const iocshArg * const errlogInit2Args[] =
|
||||
static const iocshFuncDef errlogInit2FuncDef = {
|
||||
"errlogInit2", 2, errlogInit2Args,
|
||||
"Initialize error log client buffer size and maximum message size\n"
|
||||
" bufSize - size of circular buffer (default = 1280 bytes)\n"
|
||||
" maxMsgSize - maximum size of error message (default = 256 bytes)\n"
|
||||
" bufSize - size of circular buffer (default = 2560 bytes)\n"
|
||||
" maxMsgSize - maximum size of error message (default = 512 bytes)\n"
|
||||
};
|
||||
static void errlogInit2CallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user