Do not mix "Dynamic FileName Archive Logic" together with "Static FileName Archive Logic" as one will get unexpected archive behavior.
Dynamic FileName Archive Logic - Enabled by using fileName="${basedir}/AppLog.${shortdate}.log". This means it will roll / archive dynamically because of the layout-renderer-logic in ${date} (Changes on day-change). Never use it together with archiveFileName="..." or archiveEvery="Day".
Static FileName Archive Logic - Enabled by using archiveEvery="Day" and archiveFileName="...". This means it will expect the FileName to be static (Ex. fileName="${basedir}/AppLog.txt"). Never use dynamic layout (Ex. ${date}) in archiveFileName="..." or fileName="...". Instead use archiveDateFormat together with {#}.