When I write a new logrotate config, I don’t want to wait for tomorrow’s run to find out it has a typo in it. logrotate has a debug mode that reads the config, works out what it would rotate and prints its reasoning, and leaves the logs alone.
sudo logrotate -d /etc/logrotate.d/myapp
With -d (long form --debug) nothing changes: no file gets renamed, compressed or deleted, and the state file where logrotate remembers its earlier runs isn’t updated either. What you get instead is the decision per log file: which settings it picked up, whether the file is due (or log does not need rotating) and which file names it would create.
To check everything the daily run handles, including every snippet in /etc/logrotate.d/, point it at the main config:
sudo logrotate -d /etc/logrotate.conf
A syntax error or an unknown directive shows up right away, and that alone is why I’d run this after every edit.
The catch: since the state file stays as it is, a dry run says “not yet” for a log that was rotated recently, even when your new settings are fine. To actually see a rotation happen, -f (--force) rotates even when logrotate thinks it isn’t needed. That one does change files, so I’d only use it once the debug output looks right, together with -v so it tells you what it’s doing.
Further reading: logrotate(8) man page