Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: How to use file-logger in apisix-ingress-controller? #2312

Open
sologgfun opened this issue Oct 17, 2024 · 1 comment
Open
Labels

Comments

@sologgfun
Copy link

Issue description

I used the YAML file below to create an ApisixRoute and the file-logger plugin. To view the logs, I ran the following command:

kubectl logs -f ingress-apisix-composite-deployment-686d9cccc5-n5f7t -n ingress-apisix ingress-apisix

This showed that the plugin was correctly loaded. Based on my understanding, there should be a corresponding file.log within the APISIX container, but it is not present.(echo plugin to test is worked)

I deploy apisix-ingress with this article https://apisix.apache.org/zh/blog/2023/10/18/ingress-apisix/.

Is there something I missed?where my file.log

image
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
  name: file-logger-config
  namespace: test
spec:
  plugins:
  - name: file-logger
    enable: true
    config:
      "path": "logs/file.log"
      
apiVersion: apisix.apache.org/v2
kind: ApisixRoute
metadata:
  name: kcs-route
  namespace: test
spec:
  http:
    - name: kcs-backend
      priority: 1
      websocket: true
      match:
        paths:
          - "/dd/*"
      backends:
        - serviceName: kcs-console-vue
          servicePort: 8088
      plugin_config_name: file-logger-config

Environment

apisix-ingress-controller version is 1.7.0

Copy link

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant