A drug delivery assembly, comprising: (i) a drug delivery device comprising: - a drug reservoir or means for receiving a drug reservoir, the reservoir comprising an outlet portion, - a drug expelling assembly (220, 255), (ii) a logging module releasably attachable to the drug delivery device and comprising electronic circuitry adapted to create a log of expelled dose amounts of drug, comprising: - sensor means adapted to capture a property value related to a dose amount of drug expelled from a reservoir by the expelling assembly during an expelling event, - processor means adapted to determine dose amounts based on captured property values, (iii) a cap releasably attachable to the logging module to cover an outlet portion of a mounted drug reservoir, wherein: - the logging module and the drug delivery device comprise mating snap coupling means (526, 211) allowing the logging module and the drug delivery device to be releasably coupled to each other by relative movement there between in a first direction, characterized in that - the logging module comprises locking means (324, 327, 624, 627) acting on the locking module snap coupling means and being actuatable between a locked and an unlocked state, - the locking means is actuated from the unlocked to the locked state when the cap, with the logging module coupled to the drug delivery device, is attached to the logging module in the first direction, and - the locking means is actuated from the locked to the unlocked state when the cap is detached from the logging module in a second direction opposed to the first direction. (i) a drug delivery device comprising: - a drug reservoir or means for receiving a drug reservoir, the reservoir comprising an outlet portion, - a drug expelling assembly (220, 255), - a drug reservoir or means for receiving a drug reservoir, the reservoir comprising an outlet portion, - a drug expelling assembly (220, 255), (ii) a logging module releasably attachable to the drug delivery device and comprising electronic circuitry adapted to create a log of expelled dose amounts of drug, comprising: - sensor means adapted to capture a property value related to a dose amount of drug expelled from a reservoir by the expelling assembly during an expelling event, - processor means adapted to determine dose amounts based on captured property values, - sensor means adapted to capture a property value related to a dose amount of drug expelled from a reservoir by the expelling assembly during an expelling event, - processor means adapted to determine dose amounts based on captured property values, (iii) a cap releasably attachable to the logging module to cover an outlet portion of a mounted drug reservoir, - the logging module and the drug delivery device comprise mating snap coupling means (526, 211) allowing the logging module and the drug delivery device to be releasably coupled to each other by relative movement there between in a first direction, characterized in that - the logging module comprises locking means (324, 327, 624, 627) acting on the locking module snap coupling means and being actuatable between a locked and an unlocked state, - the locking means is actuated from the unlocked to the locked state when the cap, with the logging module coupled to the drug delivery device, is attached to the logging module in the first direction, and - the locking means is actuated from the locked to the unlocked state when the cap is detached from the logging module in a second direction opposed to the first direction.