How to use logrotate cut uwsgi log files

My uwsgi.log path: /root/code/script/uWSGI.log

My logrotate about uwsgi configuration:

in /etc/logrotate.d/uwsgi
/root/code/script/uWSGI.log {
    daily
    missingok
    rotate 7
    compress
    delaycompress
    notifempty
    create 640 root root
    sharedscripts
    postrotate
        touch /root/code/script/.touchforlogrotate
    endscript
}

My uwsgi.ini

[uwsgi]
http = 0.0.0.0:8050
socket=/root/code/script/uwsgi.sock
master=true
chdir=/root/code/
wsgi-file=/root/code/data_analysis/wsgi.py
home = /root/anaconda3/envs/data-analysis
worker=6
threads=2
max-requests=5000
thunder-lock=true
enable-threads=true
pidfile=/root/code/script/uwsgi.pid
touch-logreopen = /root/code/script/.touchforlogrotate

when i use logrotate -d /etc/logrotate.d/uwsgi command, the following error occurs

reading config file uwsgi
error: uwsgi:2 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:3 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:4 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:5 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:6 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:7 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:8 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:9 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:10 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:11 lines must begin with a keyword or a filename (possibly in double quotes)
error: uwsgi:12 lines must begin with a keyword or a filename (possibly in double quotes)
Reading state from file: /var/lib/logrotate/status
Allocating hash table for state file, size 64 entries
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state

Handling 1 logs

rotating pattern: /root/code/script/uWSGI.log  1048576 bytes (no old logs will be kept)
empty log files are rotated, old logs are removed
considering log /root/code/script/uWSGI.log
Creating new state
  Now: 2024-08-16 17:17
  Last rotated at 2024-08-16 17:00
  log needs rotating
rotating log /root/code/script/uWSGI.log, log->rotateCount is 0
dateext suffix '-20240816'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /root/code/script/uWSGI.log.1 to /root/code/script/uWSGI.log.2 (rotatecount 1, logstart 1, i 1), 
renaming /root/code/script/uWSGI.log.0 to /root/code/script/uWSGI.log.1 (rotatecount 1, logstart 1, i 0), 
log /root/code/script/uWSGI.log.2 doesn't exist -- won't try to dispose of it
renaming /root/code/script/uWSGI.log to /root/code/script/uWSGI.log.1
disposeName will be /root/code/script/uWSGI.log.1
removing old log /root/code/script/uWSGI.log.1
error: error opening /root/code/script/uWSGI.log.1: No such file or directory

I wrote this configuration file after searching the relevant information of logrotate on the Internet, but I can’t find the relevant document that reported the error now, may I ask if there is any problem with my configuration? How should it be modified?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật