Skip to content

bug: The / in the log will be added with an extra \ when enabled file-logger and sls-logger #7785

Description

@henkuaifacai

Current Behavior

当时使用了file-logger和sls-logger会出现日志里的/会被加个\

Expected Behavior

希望能按正常的日志出输到文件和阿里云的sls

Error Logs

content:{"service_id":"","latency":0.99992752075195,"request":{"headers":{"if-modified-since":"Fri, 16 May 2014 15:12:48 GMT","upgrade-insecure-requests":"1","cache-control":"max-age=0","accept-encoding":"gzip, deflate","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36","accept-language":"zh-CN,zh;q=0.9","connection":"keep-alive","host":"60.test.com:9080","if-none-match":""53762af0-12e1""},"method":"GET","uri":"/","url":"http://60.test.com:9080/","querystring":{},"size":543},"client_ip":"192.168.139.1","upstream":"192.168.139.130:80","upstream_latency":1,"response":{"headers":{"date":"Wed, 24 Aug 2022 03:54:48 GMT","etag":""53762af0-12e1"","connection":"close","server":"APISIX/2.15.0","last-modified":"Fri, 16 May 2014 15:12:48 GMT"},"size":182,"status":304},"server":{"hostname":"Harbor","version":"2.15.0"},"apisix_latency":0,"route_id":"422421849201183291","start_time":1661313288377

Steps to Reproduce

只需要配置file-logger和sls-logger就会有这种情况

Environment

  • APISIX version (run apisix version):
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions