#ifndef __MESSAGE_TYPE_H #define __MESSAGE_TYPE_H #pragma once #include enum MessageType : int { Info = 0, //info message, no response BeginSession = 1, //start entity session EndSession = 2, //end entity session Request = 3, //call request RequestAck = 4, //request acknowledge SessionAck = 5, //start session acknowledge Register = 6, //register entity event Unregister = 7, //unregister entity event Event = 8, //event message LogEventMsgType = 9, //log event LogWarnMsgType = 10, //log warn SetVarReq = 11, //set sysvar request SetVarAck = 12, //set sysvar response GetVarReq = 13, //get sysvar request GetVarAck = 14, //get sysvar response Broadcast = 15, //broadcast msg to other entity GetSession = 16, //chromium session info // 0x00 00 00 00 - 0x00 00 FF FF for web to binary, communicate with other entity // 0x00 01 00 00 - 0x00 01 FF FF for web to chromium WEB_CHROMIUM_MSG_BEGIN = 0x00010000, RegisterNotify = 0x00010001, //web register Notify Msg UnRegisterNotify, //web unregister Notify WEB_CHROMIUM_MSG_END = 0x0001FFFF, WEB_SPECICAL_MANAGE_BEGIN = 0x00020000, WEB_GET_HTTP_HEADER, WEB_SPECICAL_MANAGE_END = 0x0002FFFF, METHOD_SYSTEM_START = 0x2F0000, METHOD_SYSTEM_LOG_DEBUG, METHOD_SYSTEM_LOG_INFO, METHOD_SYSTEM_LOG_WARN, METHOD_SYSTEM_LOG_ERROR, METHOD_SYSTEM_DETAIL_LOG_DEBUG, METHOD_SYSTEM_DETAIL_LOG_INFO, METHOD_SYSTEM_DETAIL_LOG_WARN, METHOD_SYSTEM_DETAIL_LOG_ERROR, METHOD_SYSTEM_END = 0x2FFFFF, METHOD_BEIDOU_LOG = 0x3F0001, }; #define PARAMLIST_HEAD "{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}" #define PKT_TYPE_CONTROL_LINKCONTEXT (1 << 31) typedef struct { char businessId[32]; //32 char traceId[32]; //32 char spanId[16]; //16 char parentSpanId[16]; //16 char timestamp[16]; //16 int reservedControl; }link_context; std::string GetMessageTypeString(int messageType); #endif /* log detail MessageType include£şMETHOD_SYSTEM_DETAIL_LOG_DEBUG(3080197), METHOD_SYSTEM_DETAIL_LOG_INFO, METHOD_SYSTEM_DETAIL_LOG_WARN, METHOD_SYSTEM_DETAIL_LOG_ERROR, { "messageType": 3080198, "EntityName": "postmanpostman", "ResultMsg": "for LogTest from postman", "LogType": "VTMWeb", "CostTime": 444, "ResultCode": "RTA444444", "LogCode": "ASDASSD", "API": "postman::test", "SourceType": "test.cpp", "BussID":"asdfafwerwqerqwerwerqwerwqerwerwqerwqerqwer", "TipMsg":"fjoawjerfownfojinwiqfneuiwnefionwfnewqionr", "BeginTime":123456, "EndTime":234567, "CmptId":"232323", "CmptName":"sldfoeofoefbo" } messageType must have EntityName must have, it mean your upload entityName ResultMsg must have, it means your log LogType Not necessarily needed, if it equals to User, means upload it as LOG_TYPE_USER, otherwise, upload as LOG_TYPE_SYSTEM CostTime Not necessarily needed, it means how much time used ResultCode Not necessarily needed, Commonly, filling it with error code. LogCode Not necessarily needed, Commonly, filling it such as QLR0402402Z00001 API Not necessarily needed, current API which you are using SourceType Not necessarily needed, current file and line when the code is running BussID Not necessarily needed,like the beidou TipMsg Not necessarily needed,what the msg you desired to show when errors cause BegtinTime Not necessarily needed, begin Time EndTime Not necessarily needed, end Time CmptId Not necessarily needed CmptName Not necessarily needed httptest WS ws://99.12.43.134:9002 { "messageType": 3080198, "EntityName": "postmanpostman", "ResultMsg": "for LogTest from postman", "LogType": "User", "CostTime": 444, "ResultCode": "RTA444444", "LogCode": "ASDASSD", "API": "postman::test", "SourceType": "test.cpp", "BussID":"asdfafwerwqerqwerwerqwerwqerwerwqerwqerqwer", "TipMsg":"fjoawjerfownfojinwiqfneuiwnefionwfnewqionr", "BeginTime":123456, "EndTime":234567 } {{@streaming async function writeStream(){ await sleep(3000); $requestClient.send({ "event": "ping", "reqid": 45 }); await sleep(1000); } exports.waitPromise = writeStream(); }} vtmweb WS ws://99.12.43.134:9002 { "messageType": 3080198, "EntityName": "postmanpostman", "ResultMsg": "for LogTest from postman", "LogType": "VTMWeb", "CostTime": 444, "ResultCode": "RTA444444", "LogCode": "ASDASSD", "API": "postman::test", "SourceType": "test.cpp", "BussID":"asdfafwerwqerqwerwerqwerwqerwerwqerwqerqwer", "TipMsg":"fjoawjerfownfojinwiqfneuiwnefionwfnewqionr", "BeginTime":123456, "EndTime":234567, "CmptId":"232323", "CmptName":"sldfoeofoefbo" } {{@streaming async function writeStream(){ await sleep(1000); $requestClient.send({ "event": "ping", "reqid": 45 }); await sleep(1000); } exports.waitPromise = writeStream(); }} */ /* beidou [[tracing]] { "api": "testBeidouAPI", "businessId": "testBeidou", "callStack": [], "dbStack": [], "deployUnitId": "testBeidouPostdeployUnitId", "host": "vtmtlog.paas.cmbchina.cn:8080", "parentSpanId": "0", "responseTime": "0", "returnCode": "SUC0000", "serviceUnitId": "testBeidouserviceUintId", "spanId": "e11f264333564b54", "tags": { "TerminalNo": "7555980277" }, "timestamp": "1722310468000", "traceId": "a2bcd4e10afc420b9e46a0b0030f7247" } [[tracing]] http_beidou WS ws://99.12.43.134:9002 { "messageType": 4128769, "BusinessId": "testBeidou", "TraceId": "a2bcd4e10afc420b9e46a0b0030f7247", "SpanId": "e11f264333564b54", "ParentSpanId": "0", "Timestamp": "", "Host": "", "CallStack": "", "DbStack": "", "Tags":"", "API":"testBeidouAPI", "deployUnitId":"testBeidouPostdeployUnitId", "serviceUintId":"testBeidouserviceUintId" } {{@streaming async function writeStream(){ await sleep(3000); $requestClient.send({ "event": "ping", "reqid": 45 }); await sleep(1000); } exports.waitPromise = writeStream(); }} */