You already know the first portion, lets break down the rest.
一篇 measure word for in this case a piece of writing/article etc.
日记 I understand the confusion but this term does not mean diary. it is an entry in a daily log. In this case the entry is a diary section, but the same term could be used for tracking repeating events daily, or scientific experiment recording, and so on.
That said, because there is no plural in Chinese, referring to the full collection of all entries is also 日记.
As long as you treat it like any other noun in that sense you should avoid confusion: remember that it usually defaults to the singular (entry here), unless context or additional words (like 本、簿、賬 here) say otherwise. The use of 一 with the measure word is also helpful context of it being singular.