Merge pull request #25048 from taosdata/enh/TS-4531-3.0
enh: logs and show grants
This commit is contained in:
commit
9429c9d04c
|
@ -61,9 +61,6 @@ typedef enum {
|
||||||
int32_t grantCheck(EGrantType grant);
|
int32_t grantCheck(EGrantType grant);
|
||||||
int32_t grantCheckExpire(EGrantType grant);
|
int32_t grantCheckExpire(EGrantType grant);
|
||||||
char* tGetMachineId();
|
char* tGetMachineId();
|
||||||
#ifdef TD_UNIQ_GRANT
|
|
||||||
int32_t grantCheckLE(EGrantType grant);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// #ifndef GRANTS_CFG
|
// #ifndef GRANTS_CFG
|
||||||
#ifdef TD_ENTERPRISE
|
#ifdef TD_ENTERPRISE
|
||||||
|
@ -76,7 +73,7 @@ int32_t grantCheckLE(EGrantType grant);
|
||||||
{.name = "state", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "state", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
{.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
{.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
{.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "cpu_cores", .bytes = 13 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define GRANTS_SCHEMA \
|
#define GRANTS_SCHEMA \
|
||||||
|
@ -88,7 +85,7 @@ int32_t grantCheckLE(EGrantType grant);
|
||||||
{.name = "state", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "state", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
{.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "timeseries", .bytes = 21 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
{.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "dnodes", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
{.name = "cpu_cores", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
{.name = "cpu_cores", .bytes = 13 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// #define GRANT_CFG_ADD
|
// #define GRANT_CFG_ADD
|
||||||
|
|
|
@ -359,21 +359,24 @@ static const SSysDbTableSchema userCompactsDetailSchema[] = {
|
||||||
{.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false},
|
{.name = "start_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP, .sysInfo = false},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const SSysDbTableSchema useGrantsFullSchema[] = {
|
static const SSysDbTableSchema userGrantsFullSchema[] = {
|
||||||
{.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "grant_name", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
{.name = "display_name", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "display_name", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
{.name = "expire", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "expire", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
{.name = "limits", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "limits", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const SSysDbTableSchema useGrantsLogsSchema[] = {
|
static const SSysDbTableSchema userGrantsLogsSchema[] = {
|
||||||
{.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "state", .bytes = 1536 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
{.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "active", .bytes = 512 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
{.name = "machine", .bytes = TSDB_GRANT_LOG_COL_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "machine", .bytes = TSDB_GRANT_LOG_COL_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const SSysDbTableSchema useMachinesSchema[] = {
|
static const SSysDbTableSchema userMachinesSchema[] = {
|
||||||
{.name = "id", .bytes = TSDB_CLUSTER_ID_LEN + 1 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "id", .bytes = TSDB_CLUSTER_ID_LEN + 1 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
|
#ifndef TD_UNIQ_GRANT
|
||||||
|
{.name = "dnode_num", .bytes = 4, .type = TSDB_DATA_TYPE_INT, .sysInfo = true},
|
||||||
|
#endif
|
||||||
{.name = "machine", .bytes = 7552 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
{.name = "machine", .bytes = 7552 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -406,9 +409,9 @@ static const SSysTableMeta infosMeta[] = {
|
||||||
{TSDB_INS_TABLE_VIEWS, userViewsSchema, tListLen(userViewsSchema), false},
|
{TSDB_INS_TABLE_VIEWS, userViewsSchema, tListLen(userViewsSchema), false},
|
||||||
{TSDB_INS_TABLE_COMPACTS, userCompactsSchema, tListLen(userCompactsSchema), false},
|
{TSDB_INS_TABLE_COMPACTS, userCompactsSchema, tListLen(userCompactsSchema), false},
|
||||||
{TSDB_INS_TABLE_COMPACT_DETAILS, userCompactsDetailSchema, tListLen(userCompactsDetailSchema), false},
|
{TSDB_INS_TABLE_COMPACT_DETAILS, userCompactsDetailSchema, tListLen(userCompactsDetailSchema), false},
|
||||||
{TSDB_INS_TABLE_GRANTS_FULL, useGrantsFullSchema, tListLen(useGrantsFullSchema), true},
|
{TSDB_INS_TABLE_GRANTS_FULL, userGrantsFullSchema, tListLen(userGrantsFullSchema), true},
|
||||||
{TSDB_INS_TABLE_GRANTS_LOGS, useGrantsLogsSchema, tListLen(useGrantsLogsSchema), true},
|
{TSDB_INS_TABLE_GRANTS_LOGS, userGrantsLogsSchema, tListLen(userGrantsLogsSchema), true},
|
||||||
{TSDB_INS_TABLE_MACHINES, useMachinesSchema, tListLen(useMachinesSchema), true},
|
{TSDB_INS_TABLE_MACHINES, userMachinesSchema, tListLen(userMachinesSchema), true},
|
||||||
{TSDB_INS_TABLE_ARBGROUPS, arbGroupsSchema, tListLen(arbGroupsSchema), true},
|
{TSDB_INS_TABLE_ARBGROUPS, arbGroupsSchema, tListLen(arbGroupsSchema), true},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,5 @@
|
||||||
int32_t grantCheck(EGrantType grant) { return TSDB_CODE_SUCCESS; }
|
int32_t grantCheck(EGrantType grant) { return TSDB_CODE_SUCCESS; }
|
||||||
int32_t grantCheckExpire(EGrantType grant) { return TSDB_CODE_SUCCESS; }
|
int32_t grantCheckExpire(EGrantType grant) { return TSDB_CODE_SUCCESS; }
|
||||||
|
|
||||||
#ifdef TD_UNIQ_GRANT
|
|
||||||
int32_t grantCheckLE(EGrantType grant) { return TSDB_CODE_SUCCESS; }
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
#ifdef TD_UNIQ_GRANT
|
|
||||||
int32_t grantCheckExpire(EGrantType grant) { return TSDB_CODE_SUCCESS; }
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
|
@ -217,8 +217,6 @@ typedef struct {
|
||||||
uint16_t port;
|
uint16_t port;
|
||||||
char fqdn[TSDB_FQDN_LEN];
|
char fqdn[TSDB_FQDN_LEN];
|
||||||
char ep[TSDB_EP_LEN];
|
char ep[TSDB_EP_LEN];
|
||||||
char active[TSDB_ACTIVE_KEY_LEN];
|
|
||||||
char connActive[TSDB_CONN_ACTIVE_KEY_LEN];
|
|
||||||
char machineId[TSDB_MACHINE_ID_LEN + 1];
|
char machineId[TSDB_MACHINE_ID_LEN + 1];
|
||||||
} SDnodeObj;
|
} SDnodeObj;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "taos_monitor.h"
|
#include "taos_monitor.h"
|
||||||
|
|
||||||
#define TSDB_DNODE_VER_NUMBER 2
|
#define TSDB_DNODE_VER_NUMBER 2
|
||||||
#define TSDB_DNODE_RESERVE_SIZE 64
|
#define TSDB_DNODE_RESERVE_SIZE 40
|
||||||
|
|
||||||
static const char *offlineReason[] = {
|
static const char *offlineReason[] = {
|
||||||
"",
|
"",
|
||||||
|
@ -183,11 +183,10 @@ static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode) {
|
||||||
SDB_SET_INT64(pRaw, dataPos, pDnode->updateTime, _OVER)
|
SDB_SET_INT64(pRaw, dataPos, pDnode->updateTime, _OVER)
|
||||||
SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER)
|
SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER)
|
||||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
||||||
|
SDB_SET_BINARY(pRaw, dataPos, pDnode->machineId, TSDB_MACHINE_ID_LEN, _OVER)
|
||||||
SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
||||||
SDB_SET_INT16(pRaw, dataPos, TSDB_ACTIVE_KEY_LEN, _OVER)
|
SDB_SET_INT16(pRaw, dataPos, 0, _OVER) // forward/backward compatible
|
||||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER)
|
SDB_SET_INT16(pRaw, dataPos, 0, _OVER) // forward/backward compatible
|
||||||
SDB_SET_INT16(pRaw, dataPos, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
|
||||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
|
||||||
SDB_SET_DATALEN(pRaw, dataPos, _OVER);
|
SDB_SET_DATALEN(pRaw, dataPos, _OVER);
|
||||||
|
|
||||||
terrno = 0;
|
terrno = 0;
|
||||||
|
@ -227,13 +226,14 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
|
||||||
SDB_GET_INT64(pRaw, dataPos, &pDnode->updateTime, _OVER)
|
SDB_GET_INT64(pRaw, dataPos, &pDnode->updateTime, _OVER)
|
||||||
SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER)
|
SDB_GET_INT16(pRaw, dataPos, &pDnode->port, _OVER)
|
||||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
||||||
|
SDB_GET_BINARY(pRaw, dataPos, pDnode->machineId, TSDB_MACHINE_ID_LEN, _OVER)
|
||||||
SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
||||||
if (sver > 1) {
|
if (sver > 1) {
|
||||||
int16_t keyLen = 0;
|
int16_t keyLen = 0;
|
||||||
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
||||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->active, keyLen, _OVER)
|
SDB_GET_BINARY(pRaw, dataPos, NULL, keyLen, _OVER)
|
||||||
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
||||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->connActive, keyLen, _OVER)
|
SDB_GET_BINARY(pRaw, dataPos, NULL, keyLen, _OVER)
|
||||||
}
|
}
|
||||||
|
|
||||||
terrno = 0;
|
terrno = 0;
|
||||||
|
@ -271,12 +271,7 @@ static int32_t mndDnodeActionUpdate(SSdb *pSdb, SDnodeObj *pOld, SDnodeObj *pNew
|
||||||
mTrace("dnode:%d, perform update action, old row:%p new row:%p", pOld->id, pOld, pNew);
|
mTrace("dnode:%d, perform update action, old row:%p new row:%p", pOld->id, pOld, pNew);
|
||||||
pOld->updateTime = pNew->updateTime;
|
pOld->updateTime = pNew->updateTime;
|
||||||
#ifdef TD_ENTERPRISE
|
#ifdef TD_ENTERPRISE
|
||||||
if (strncmp(pOld->active, pNew->active, TSDB_ACTIVE_KEY_LEN) != 0) {
|
tstrncpy(pOld->machineId, pNew->machineId, TSDB_MACHINE_ID_LEN + 1);
|
||||||
strncpy(pOld->active, pNew->active, TSDB_ACTIVE_KEY_LEN);
|
|
||||||
}
|
|
||||||
if (strncmp(pOld->connActive, pNew->connActive, TSDB_CONN_ACTIVE_KEY_LEN) != 0) {
|
|
||||||
strncpy(pOld->connActive, pNew->connActive, TSDB_CONN_ACTIVE_KEY_LEN);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -716,6 +711,35 @@ _OVER:
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int32_t mndUpdateDnodeObj(SMnode *pMnode, SDnodeObj *pDnode) {
|
||||||
|
int32_t code = 0;
|
||||||
|
STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, NULL, "update-dnode-obj");
|
||||||
|
if (pTrans == NULL) {
|
||||||
|
code = terrno;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pDnode->updateTime = taosGetTimestampMs();
|
||||||
|
|
||||||
|
SSdbRaw *pCommitRaw = mndDnodeActionEncode(pDnode);
|
||||||
|
if (pCommitRaw == NULL || mndTransAppendCommitlog(pTrans, pCommitRaw) != 0) {
|
||||||
|
mError("trans:%d, failed to append commit log since %s", pTrans->id, terrstr());
|
||||||
|
code = terrno;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
|
(void)sdbSetRawStatus(pCommitRaw, SDB_STATUS_READY);
|
||||||
|
|
||||||
|
if (mndTransPrepare(pMnode, pTrans) != 0) {
|
||||||
|
mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr());
|
||||||
|
code = terrno;
|
||||||
|
goto _exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
_exit:
|
||||||
|
mndTransDrop(pTrans);
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
|
static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
|
||||||
SMnode *pMnode = pReq->info.node;
|
SMnode *pMnode = pReq->info.node;
|
||||||
SStatusReq statusReq = {0};
|
SStatusReq statusReq = {0};
|
||||||
|
@ -885,8 +909,9 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
|
||||||
pDnode->numOfDiskCfg = statusReq.numOfDiskCfg;
|
pDnode->numOfDiskCfg = statusReq.numOfDiskCfg;
|
||||||
pDnode->memAvail = statusReq.memAvail;
|
pDnode->memAvail = statusReq.memAvail;
|
||||||
pDnode->memTotal = statusReq.memTotal;
|
pDnode->memTotal = statusReq.memTotal;
|
||||||
if (pDnode->machineId[0] == 0 && statusReq.machineId[0] != 0) {
|
if (memcmp(pDnode->machineId, statusReq.machineId, TSDB_MACHINE_ID_LEN) != 0) {
|
||||||
tstrncpy(pDnode->machineId, statusReq.machineId, TSDB_MACHINE_ID_LEN + 1);
|
tstrncpy(pDnode->machineId, statusReq.machineId, TSDB_MACHINE_ID_LEN + 1);
|
||||||
|
mndUpdateDnodeObj(pMnode, pDnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
SStatusRsp statusRsp = {0};
|
SStatusRsp statusRsp = {0};
|
||||||
|
|
|
@ -969,7 +969,7 @@ static int32_t parseTagsClauseImpl(SInsertParseContext* pCxt, SVnodeModifyOpStmt
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
for (int32_t i = 0; i < TARRAY_SIZE(pTagVals); ++i) {
|
for (int32_t i = 0; i < taosArrayGetSize(pTagVals); ++i) {
|
||||||
STagVal* p = (STagVal*)TARRAY_GET_ELEM(pTagVals, i);
|
STagVal* p = (STagVal*)TARRAY_GET_ELEM(pTagVals, i);
|
||||||
if (IS_VAR_DATA_TYPE(p->type)) {
|
if (IS_VAR_DATA_TYPE(p->type)) {
|
||||||
taosMemoryFreeClear(p->pData);
|
taosMemoryFreeClear(p->pData);
|
||||||
|
|
|
@ -41,6 +41,12 @@
|
||||||
#define LOG_BUF_SIZE(x) ((x)->buffSize)
|
#define LOG_BUF_SIZE(x) ((x)->buffSize)
|
||||||
#define LOG_BUF_MUTEX(x) ((x)->buffMutex)
|
#define LOG_BUF_MUTEX(x) ((x)->buffMutex)
|
||||||
|
|
||||||
|
#ifdef TD_ENTERPRISE
|
||||||
|
#define LOG_EDITION_FLG ("E")
|
||||||
|
#else
|
||||||
|
#define LOG_EDITION_FLG ("C")
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *buffer;
|
char *buffer;
|
||||||
int32_t buffStart;
|
int32_t buffStart;
|
||||||
|
@ -490,8 +496,9 @@ static inline int32_t taosBuildLogHead(char *buffer, const char *flags) {
|
||||||
time_t curTime = timeSecs.tv_sec;
|
time_t curTime = timeSecs.tv_sec;
|
||||||
ptm = taosLocalTime(&curTime, &Tm, NULL);
|
ptm = taosLocalTime(&curTime, &Tm, NULL);
|
||||||
|
|
||||||
return sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d %08" PRId64 " %s", ptm->tm_mon + 1, ptm->tm_mday, ptm->tm_hour,
|
return sprintf(buffer, "%02d/%02d %02d:%02d:%02d.%06d %08" PRId64 " %s %s", ptm->tm_mon + 1, ptm->tm_mday,
|
||||||
ptm->tm_min, ptm->tm_sec, (int32_t)timeSecs.tv_usec, taosGetSelfPthreadId(), flags);
|
ptm->tm_hour, ptm->tm_min, ptm->tm_sec, (int32_t)timeSecs.tv_usec, taosGetSelfPthreadId(),
|
||||||
|
LOG_EDITION_FLG, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void taosPrintLogImp(ELogLevel level, int32_t dflag, const char *buffer, int32_t len) {
|
static inline void taosPrintLogImp(ELogLevel level, int32_t dflag, const char *buffer, int32_t len) {
|
||||||
|
|
Loading…
Reference in New Issue