Skip to content

Commit

Permalink
logger must not report an error
Browse files Browse the repository at this point in the history
when receiving unsupported parameters,
just convert for string via lua_tostring
  • Loading branch information
findstr committed May 17, 2024
1 parent eda2dd0 commit aa1be00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lualib-src/lualib-logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ log_field(lua_State *L, struct log_buffer *b, int stk, int type, int deep)
log_buffer_append(b, LOG_NIL_STR, sizeof(LOG_NIL_STR) - 1);
break;
default:
luaL_error(L, "log unspport param#%d type:%s",
stk, lua_typename(L, type));
str = lua_tolstring(L, stk, &sz);
log_buffer_append(b, str, sz);
break;
}
}
Expand Down

0 comments on commit aa1be00

Please sign in to comment.