mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 07:30:42 +01:00
Merge branch 'master' into perf
Conflicts: ChangeLog
This commit is contained in:
commit
b849df2004
@ -2,6 +2,10 @@
|
|||||||
Version 3.21.6 [DEVEL] (rgerhards), 2008-10-??
|
Version 3.21.6 [DEVEL] (rgerhards), 2008-10-??
|
||||||
- doc bugfix: queue doc had wrong parameter name for setting controlling
|
- doc bugfix: queue doc had wrong parameter name for setting controlling
|
||||||
worker thread shutdown period
|
worker thread shutdown period
|
||||||
|
- consolidated time calls during msg object creation, improves performance
|
||||||
|
and consistency
|
||||||
|
- bugfix: subsecond time properties generated by imfile, imklog and
|
||||||
|
internal messages could be slightly inconsistent
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Version 3.21.5 [DEVEL] (rgerhards), 2008-09-30
|
Version 3.21.5 [DEVEL] (rgerhards), 2008-09-30
|
||||||
- performance optimization: unnecessary time() calls during message
|
- performance optimization: unnecessary time() calls during message
|
||||||
@ -109,6 +113,10 @@ Version 3.21.0 [DEVEL] (rgerhards), 2008-07-18
|
|||||||
see below)
|
see below)
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Version 3.19.12 [BETA] (rgerhards), 2008-08-25
|
Version 3.19.12 [BETA] (rgerhards), 2008-08-25
|
||||||
|
- bugfix: subseconds where not correctly extracted from a timestamp
|
||||||
|
if that timestamp did not contain any subsecond information (the
|
||||||
|
resulting string was garbagge but should have been "0", what it
|
||||||
|
now is).
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Version 3.19.11 [BETA] (rgerhards), 2008-08-25
|
Version 3.19.11 [BETA] (rgerhards), 2008-08-25
|
||||||
This is a refresh of the beta. No beta-specific fixes have been added.
|
This is a refresh of the beta. No beta-specific fixes have been added.
|
||||||
|
|||||||
@ -103,7 +103,6 @@ static rsRetVal enqLine(fileInfo_t *pInfo, cstr_t *cstrLine)
|
|||||||
pMsg->iFacility = LOG_FAC(pInfo->iFacility);
|
pMsg->iFacility = LOG_FAC(pInfo->iFacility);
|
||||||
pMsg->iSeverity = LOG_PRI(pInfo->iSeverity);
|
pMsg->iSeverity = LOG_PRI(pInfo->iSeverity);
|
||||||
pMsg->bParseHOSTNAME = 0;
|
pMsg->bParseHOSTNAME = 0;
|
||||||
datetime.getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
|
|
||||||
CHKiRet(submitMsg(pMsg));
|
CHKiRet(submitMsg(pMsg));
|
||||||
finalize_it:
|
finalize_it:
|
||||||
RETiRet;
|
RETiRet;
|
||||||
|
|||||||
@ -106,7 +106,6 @@ enqMsg(uchar *msg, uchar* pszTag, int iFacility, int iSeverity)
|
|||||||
pMsg->iFacility = LOG_FAC(iFacility);
|
pMsg->iFacility = LOG_FAC(iFacility);
|
||||||
pMsg->iSeverity = LOG_PRI(iSeverity);
|
pMsg->iSeverity = LOG_PRI(iSeverity);
|
||||||
pMsg->bParseHOSTNAME = 0;
|
pMsg->bParseHOSTNAME = 0;
|
||||||
datetime.getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
|
|
||||||
CHKiRet(submitMsg(pMsg));
|
CHKiRet(submitMsg(pMsg));
|
||||||
|
|
||||||
finalize_it:
|
finalize_it:
|
||||||
|
|||||||
@ -269,7 +269,6 @@ CODESTARTrunInput
|
|||||||
pMsg->iFacility = LOG_FAC(pri);
|
pMsg->iFacility = LOG_FAC(pri);
|
||||||
pMsg->iSeverity = LOG_PRI(pri);
|
pMsg->iSeverity = LOG_PRI(pri);
|
||||||
pMsg->bParseHOSTNAME = 0;
|
pMsg->bParseHOSTNAME = 0;
|
||||||
getCurrTime(&(pMsg->tTIMESTAMP)); / * use the current time! * /
|
|
||||||
flags |= INTERNAL_MSG;
|
flags |= INTERNAL_MSG;
|
||||||
logmsg(pMsg, flags); / * some time, CHKiRet() will work here, too [today NOT!] * /
|
logmsg(pMsg, flags); / * some time, CHKiRet() will work here, too [today NOT!] * /
|
||||||
*
|
*
|
||||||
|
|||||||
@ -582,7 +582,7 @@ int formatTimestampSecFrac(struct syslogTime *ts, char* pBuf, size_t iLenBuf)
|
|||||||
lenRet = snprintf(pBuf, iLenBuf, szFmtStr, ts->secfrac);
|
lenRet = snprintf(pBuf, iLenBuf, szFmtStr, ts->secfrac);
|
||||||
} else {
|
} else {
|
||||||
pBuf[0] = '0';
|
pBuf[0] = '0';
|
||||||
pBuf[1] = '1';
|
pBuf[1] = '\0';
|
||||||
lenRet = 1;
|
lenRet = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -257,7 +257,16 @@ rsRetVal msgConstruct(msg_t **ppThis)
|
|||||||
pM->iRefCount = 1;
|
pM->iRefCount = 1;
|
||||||
pM->iSeverity = -1;
|
pM->iSeverity = -1;
|
||||||
pM->iFacility = -1;
|
pM->iFacility = -1;
|
||||||
|
|
||||||
|
/* we initialize both timestamps to contain the current time, so that they
|
||||||
|
* are consistent. Also, this saves us from doing any further time calls just
|
||||||
|
* to obtain a timestamp. The memcpy() should not really make a difference,
|
||||||
|
* especially as I think there is no codepath currently where it would not be
|
||||||
|
* required (after I have cleaned up the pathes ;)). -- rgerhards, 2008-10-02
|
||||||
|
*/
|
||||||
datetime.getCurrTime(&(pM->tRcvdAt));
|
datetime.getCurrTime(&(pM->tRcvdAt));
|
||||||
|
memcpy(&pM->tTIMESTAMP, &pM->tRcvdAt, sizeof(struct syslogTime));
|
||||||
|
|
||||||
objConstructSetObjInfo(pM);
|
objConstructSetObjInfo(pM);
|
||||||
|
|
||||||
/* DEV debugging only! dbgprintf("msgConstruct\t0x%x, ref 1\n", (int)pM);*/
|
/* DEV debugging only! dbgprintf("msgConstruct\t0x%x, ref 1\n", (int)pM);*/
|
||||||
|
|||||||
@ -914,7 +914,6 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags)
|
|||||||
pMsg->iFacility = LOG_FAC(pri);
|
pMsg->iFacility = LOG_FAC(pri);
|
||||||
pMsg->iSeverity = LOG_PRI(pri);
|
pMsg->iSeverity = LOG_PRI(pri);
|
||||||
pMsg->bParseHOSTNAME = 0;
|
pMsg->bParseHOSTNAME = 0;
|
||||||
datetime.getCurrTime(&(pMsg->tTIMESTAMP)); /* use the current time! */
|
|
||||||
flags |= INTERNAL_MSG;
|
flags |= INTERNAL_MSG;
|
||||||
|
|
||||||
/* we now check if we should print internal messages out to stderr. This was
|
/* we now check if we should print internal messages out to stderr. This was
|
||||||
@ -1328,7 +1327,6 @@ static int parseRFCSyslogMsg(msg_t *pMsg, int flags)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* TIMESTAMP */
|
/* TIMESTAMP */
|
||||||
memcpy(&pMsg->tTIMESTAMP, &pMsg->tRcvdAt, sizeof(struct syslogTime));
|
|
||||||
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
|
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
|
||||||
if(flags & IGNDATE) {
|
if(flags & IGNDATE) {
|
||||||
/* we need to ignore the msg data, so simply copy over reception date */
|
/* we need to ignore the msg data, so simply copy over reception date */
|
||||||
@ -1415,7 +1413,6 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
|
|||||||
* message. There we go from high-to low precison and are done
|
* message. There we go from high-to low precison and are done
|
||||||
* when we find a matching one. -- rgerhards, 2008-09-16
|
* when we find a matching one. -- rgerhards, 2008-09-16
|
||||||
*/
|
*/
|
||||||
memcpy(&pMsg->tTIMESTAMP, &pMsg->tRcvdAt, sizeof(struct syslogTime));
|
|
||||||
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
|
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
|
||||||
/* we are done - parse pointer is moved by ParseTIMESTAMP3339 */;
|
/* we are done - parse pointer is moved by ParseTIMESTAMP3339 */;
|
||||||
} else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
|
} else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse) == RS_RET_OK) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user