ederparaiso opened a new issue, #8387:
URL: https://github.com/apache/apisix/issues/8387

   ### Description
   
   Hi, as posted on slack forum, I'm trying to configure file-log plugin in 
apisix (version 3.0.0)
   It doesn't show any erros but  no file.log file was created in 
/usr/local/apisix/logs. Is this the root directory when I specify a relative 
path in file-log configuration path? What I'm still doing wrong? 
   
   Also, I just want to understand why, by default, (in my tests at least) 
/usr/local/apisix/logs is created with root permissions even if I don't map it 
to a external volume. Should this directory have write persmissions to apisix 
user by default?
   
   Thanks in advance!
   
   compose file
   ```yaml
   version: '3.7'
   
   services:
     apisix-dashboard:
       image: apache/apisix-dashboard:2.13-alpine
       container_name: apisix-dashboard
       restart: always
       volumes:
       - ./dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
       ports:
       - "9000:9000"
       networks:
         - apisix_network
   
     apisix:
       image: apache/apisix:3.0.0-debian
       container_name: apisix
       restart: always
       volumes:
         - ./apisix_log:/usr/local/apisix/logs
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
       depends_on:
         - etcd
       ports:
         - "9180:9180/tcp"
         - "9080:9080/tcp"
         - "9091:9091/tcp"
         - "9443:9443/tcp"
         - "9092:9092/tcp"
       networks:
         - apisix_network
   
     etcd:
       image: bitnami/etcd:3.4.15
       container_name: etcd
       restart: always
       volumes:
         - etcd_data:/bitnami/etcd
       environment:
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379/";
         ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379/";
       ports:
         - "2379:2379/tcp"
       networks:
         - apisix_network
   
   networks:
     apisix_network:
       driver: bridge
       external: true
   
   volumes:
     etcd_data:
       driver: local
    ```
   
   route/plugin configs
   ```json
   {
     "uri": "/v3/bc8fdfcd-0392-49fa-8520-c8644d1688c8",
     "name": "test",
     "plugins": {
       "file-logger": {
         "path": "logs/file.log"
       }
     },
     "upstream": {
       "nodes": [
         {
           "host": "run.mocky.io",
           "port": 443,
           "weight": 1
         }
       ],
       "type": "roundrobin",
       "hash_on": "vars",
       "scheme": "https",
       "pass_host": "pass"
     },
     "status": 1
   }
   ```
   
   example
   ```sh
   curl -i http://127.0.0.1:9080/v3/bc8fdfcd-0392-49fa-8520-c8644d1688c8 -H 
"Host: http://run.mocky.io/";
   ```
   
   
   
   
   ### Environment
   
   - APISIX version 3.0.0-debian (run via docker image)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to