The rule
You keep the logs that the high-risk system generates automatically, to the extent they are under your control, for a period appropriate to the intended purpose, of at least six months, unless applicable Union or national law provides otherwise [1]. For HR systems that applies from 2 December 2027 [2].
What logs are
A high-risk system automatically records events over its lifetime [3]. The provider also keeps the logs under its control for at least six months [4]. Agree which logs are held by you and which by the supplier.
Overlap with the GDPR
Logs about applicants or employees are often personal data. You do not keep those longer than necessary for the purpose [5]. Record the period and the reason, for example in your DPIA.