AI Act Article 12 requires high-risk AI systems to be built so they automatically record events over their whole lifetime, and the records must support traceability of risks, post-market monitoring and operational oversight. Providers and deployers must keep these logs for the periods the Act sets, and deployers keep them for at least six months. The article below explains which events to capture and how to design the logging.
Key takeaways
- Article 12 is a design requirement: the system must technically allow automatic event recording, not just be monitored afterwards.
- Logs must serve three purposes named in the Act: identifying risk or substantial modification, post-market monitoring and operational monitoring.
- Retention is a balance between the minimum periods in the Act and storage limits under the GDPR.
- Logging most often fails through gaps such as missing model versions, unrecorded human overrides and logs nobody reviews.
What does Article 12 require?
Article 12 requires high-risk AI systems to technically allow the automatic recording of events, called logs, over the lifetime of the system. The text is in Regulation (EU) 2024/1689, the AI Act. The obligation concerns capability: the system must be designed to produce these records from the start.
Article 12(2) names three purposes the logs must serve, as stated in the same regulation: identifying situations that may result in risk or substantial modification, facilitating post-market monitoring, and monitoring operation. These purposes shape what you record, how long you keep it and who can read it. A log that cannot answer one of these questions is probably recording the wrong things.
Which events must a high-risk AI system log?
Log every event that lets you reconstruct what the system did, with which configuration and why, measured against its intended purpose. The Act does not publish a complete field list for most systems, so the list below is an engineering baseline rather than a legal checklist.
A practical minimum event set
- Inputs received, or a reference that lets you retrieve them under access control.
- Model version, configuration identifier and the rules or thresholds active at that moment.
- Outputs, confidence values or decision states returned to the user or downstream system.
- Human review, override and approval actions, with the identity of the reviewer.
- Errors, timeouts and fallback activations.
- Changes to models, prompts, thresholds or deployment settings.
For remote biometric identification systems listed in Annex III, Article 12(3) adds specific fields, including the period of each use, the reference database checked, the input data that led to a match and the persons who verified the results. The same regulation, at its official text on EUR-Lex, is the source to check for the exact wording.
Logs often contain personal data
Inputs and outputs frequently include personal data, so logging can create a privacy obligation of its own. Store only the fields your purposes require, and separate identifiers from decision records where you can. Pseudonymisation reduces exposure but does not remove the record from GDPR scope.
How long must logs be kept?
Keep logs for at least six months where the Act sets that minimum, and for longer where another law or your own risk assessment requires it. Providers keep logs under their control for a period appropriate to the intended purpose, with at least six months as the floor under Article 19 of the AI Act. Deployers have a parallel obligation under Article 26(6) of the same regulation.
Longer retention helps post-market investigations but increases storage cost, access risk and GDPR exposure. Shorter retention reduces risk but can leave you unable to explain a past decision. Choose the period per log category instead of one number for everything, and document the reason for each choice.
How do logs interact with GDPR?
Logs that contain personal data are subject to the GDPR, so retention, access and purpose must be justified and limited. Under the AI Act, logs support compliance, but the GDPR requirements for lawfulness, minimisation and storage limitation still apply to the personal data inside them, as set out in Regulation (EU) 2016/679, the GDPR. This article is general information and not legal or tax advice.
Rui Codex provides technical implementation support, such as designing log schemas, access controls and retention jobs. Rui Codex does not provide legal or compliance advice, audits or certification, so the legal reading of these obligations belongs with qualified counsel. Teams that want background on controls for personal data can read our guide on security, GDPR and compliance engineering.
How should logging be designed in practice?
Design logging as a separate component with a defined schema, write-once storage and time-synchronised timestamps, not as ad hoc print statements. Retrofitting logs into an existing model pipeline is harder than building them in from the start, because the missing context is rarely recoverable later.
Design checklist
- Define a versioned log schema and reject records that do not match it.
- Record the model and data version in every event, not just in release notes.
- Use append-only storage or tamper-evident hashing, and restrict deletion to a documented retention job.
- Synchronise clocks and record timezone explicitly.
- Restrict read access to roles that need it, and log those reads too.
- Test that a sample decision can be reconstructed end to end before go-live.
Teams that connect models to business systems often find the integration layer is where context is lost. Our AI Act technical measures service covers logging design as implementation support, and our AI automation work covers the workflows around the model.
Where does logging fail?
Logging most often fails through gaps, not missing features. The logs exist, but they cannot answer the question someone asks months later. The failure modes below are the ones that appear most often in review of this kind of system.
- Missing model version, so logs cannot be tied to the behaviour that produced them.
- Human overrides stored in a chat tool or spreadsheet instead of the main log.
- Logs written only on success, so errors and fallbacks are invisible.
- Broad read access that exposes personal data without a recorded reason.
- Logs that are collected but never reviewed, so drift goes unnoticed.
Each fix has a trade-off. Capturing full inputs gives better reconstruction but increases personal data exposure. Capturing references is lighter but depends on the source system keeping the data intact for the retention period.
Hypothetical examples
Here are two hypothetical scenarios:
Scenario one: a hypothetical document-screening tool used by an HR team records the model output but not the reviewer who changed the result. When a candidate asks how the decision was reached, the team can show the output but cannot show who approved the change.
Scenario two: a hypothetical invoice-classification system writes logs to a shared folder with broad access. Staff must reconcile exports by hand, and the logs contain more personal data than the purpose requires.
In both cases the fix is in the design: a reviewer identifier in the decision event, and a restricted store with a retention rule that matches the stated purpose.
Frequently Asked Questions
Does Article 12 apply to every AI system?
No. Article 12 applies to high-risk AI systems as defined in the AI Act, so you must first confirm whether your system falls into that category. Systems outside the high-risk definition are not subject to this article, although good logging practice still helps with debugging and accountability.
What is the minimum retention period for AI logs?
The minimum period for deployers under Article 26(6) of the AI Act is at least six months, unless other Union or national law sets a different period. Providers keep logs under their control under Article 19, also with a floor of six months. Longer periods may apply depending on your sector and risk assessment.
Do AI logs have to include personal data?
Not necessarily. Logs must capture enough to reconstruct events for the Act's purposes, but you can often use references, pseudonymised identifiers or hashed values instead of raw personal data. Where personal data remains, GDPR rules on purpose, minimisation and storage still apply to those records.
Can logging be added to an existing AI system later?
Yes, but it is usually harder and leaves gaps for past events. Start with the event schema and version tags, then add storage and retention. Document the period before logging began, so reviewers know which decisions cannot be fully reconstructed.
Who is responsible for the logs?
Responsibility depends on whether you act as provider or deployer, and the allocation should be settled in contracts and internal policy. Technical teams build and operate the logging, but the legal allocation of duties is a question for qualified counsel. Rui Codex provides technical implementation support only.
Conclusion
Article 12 turns logging into a design requirement that must be built into a high-risk system from the start. The most useful logs record the versions, inputs references, decisions and human actions needed to reconstruct a past outcome. Retention and privacy decisions should be made per log category and documented. If you are planning logging for a high-risk system, request a project consultation at the Rui Codex contact page or email info@ruicodex.com to discuss your project. You can also review delivered projects in our published case studies.
Sources
- Regulation (EU) 2024/1689 (AI Act) - EUR-Lex, Publications Office of the European Union
- Regulation (EU) 2016/679 (General Data Protection Regulation) - EUR-Lex, Publications Office of the European Union