apache/apisix

bug: cannot use file-logger to log to stdout

开放

#6,797 创建于 2022年4月6日

 (16 条评论) (0 个反应) (1 位负责人)Lua (2,860 个派生)batch import
For studentgood first issue

仓库指标

星标
 (16,597 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Current Behavior

When using the file-logger plugin, it is possible to send the logging to stdout by defining /dev/stdout. This in order to use the docker output and relais this in kubernetes to a ELK stack. Though an error is thrown indicating a permission denied for the current user.

Expected Behavior

Be able to use /dev/stdout as a destination with the file-logger plugin.

Error Logs

failed to open file: /dev/stdout, error info: /dev/stdout: Permission denied while logging request

Steps to Reproduce

Run apisix docker with apisix.yaml:

routes:
  - uri: /*
    upstream_id: 1
    plugins:
      file-logger:
        path: /dev/stdout

upstreams:
  - id: 1
    nodes:
      "host.docker.internal:3000": 1
    type: roundrobin

plugins:
  - name: file-logger
#END

Environment

  • APISIX Docker version: apache/apisix:2.13.0-alpine
  • Host system: Macbook Pro Intel with docker desktop for mac

贡献者指南