Skip to content

Commit

Permalink
添加启动版本日志
Browse files Browse the repository at this point in the history
  • Loading branch information
DSKY\toney.yin committed Jan 9, 2024
1 parent fc87ded commit 561ecf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/hive/src/hive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void hive_app::run() {
});

//end worker接口

LOG_INFO(fmt::format("hive engine init.version:{}", HIVE_VERSION));
lua.run_script(g_sandbox, [&](std::string_view err) {
exception_handler(fmt::format("load sandbox err:{}", err));
});
Expand Down
2 changes: 2 additions & 0 deletions core/hive/src/hive.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "lualog/logger.h"
#include "worker/scheduler.h"

#define HIVE_VERSION 20240109

using namespace logger;
class hive_app final
{
Expand Down
4 changes: 2 additions & 2 deletions core/luabus/src/socket_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void socket_stream::dispatch_package(bool reset) {
router_header* header = (router_header*)data;
// 当前包长小于headlen, 关闭连接
if (header->len < header_len) {
on_error("package-length-err");
on_error(fmt::format("rpc package-length-err,ip:{}",m_ip).c_str());
return;
}
package_size = header->len;
Expand All @@ -553,7 +553,7 @@ void socket_stream::dispatch_package(bool reset) {
package_size = m_codec->load_packet(data_len);
//当前包头长度解析失败, 关闭连接
if (package_size < 0) {
on_error("package-length-err");
on_error(fmt::format("text package-length-err,ip:{}", m_ip).c_str());
return;
}
// 数据包还没有收完整
Expand Down

0 comments on commit 561ecf1

Please sign in to comment.