wklken commented on issue #9722:
URL: https://github.com/apache/apisix/issues/9722#issuecomment-1615388693
> 1. Could you describe in full the steps you took? like in what order do
you start APISIX and delete the access log?
> 2. What's your APISIX version?
I make a demo to reproduce the error
```Dockerfile
ARG APISIX_VERSION="3.2.1"
FROM apache/apisix:$APISIX_VERSION-centos
WORKDIR /usr/local/apisix
# no link to stdout/stderr, use file log collector
RUN rm -rf /usr/local/apisix/logs/* && chmod 777 /usr/local/apisix/logs
# no default nginx access log, use the plugin file-logger.path to define the
log path
RUN sed -i 's/enable_access_log: true/enable_access_log: false/g'
/usr/local/apisix/conf/config-default.yaml
```
build
```bash
docker build -t apache/apisix:development .
```
run as standalone mode
```bash
docker run --rm --name apache-apisix \
-p 9080:9080 \
-e APISIX_STAND_ALONE=true \
apache/apisix:development
```
update the apisix.yaml (based on apisix-docker docs)
```bash
docker exec -i apache-apisix sh -c 'cat > /usr/local/apisix/conf/apisix.yaml
<<_EOC_
deployment:
role: data_plane
role_data_plane:
config_provider: yaml
plugins:
- name: file-logger
- name: log-rotate
routes:
-
id: httpbin
uri: /*
upstream:
nodes:
"httpbin.org": 1
type: roundrobin
plugin_config_id: 1
plugin_configs:
-
id: 1
plugins:
response-rewrite:
body: "Hello APISIX\n"
desc: "response-rewrite"
#END
_EOC_'
```
then, enter the container, update the `plugin_attr` in `config.yaml`
(another terminal windown)
```bash
docker exec -it apache-apisix /bin/bash
vim conf/config.yaml
```
```yaml file:config.yaml
plugin_attr:
log-rotate:
interval: 1
max_kept: 7
max_size: 1073741824
enable_compression: false
file-logger:
path: logs/access.log
```
then, reload
```bash
apisix reload
tail -f log/error.log
```
--
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]