A logging device (100, 300) adapted to be releasably attached to a drug delivery device, the drug delivery device comprising: - a drug reservoir or means for receiving a drug reservoir, - drug expelling means comprising dose setting means allowing a user to set a dose amount of drug to be expelled, - actuation means actuatable between a first and a second actuation state, the first state allowing a dose amount to be set, the second state allowing the drug expelling means to expel a set dose, - first indicator means adapted to rotate during operation of the expelling means corresponding to an axis of rotation, the amount of rotation corresponding to the amount of drug expelled from a reservoir by the expelling means, and - second indicator means operatable between a first indicator state corresponding to the first actuation state, and a second indicator state corresponding to the second actuation state, characterized in that - the first indicator means comprises a magnet moving together therewith, the magnet being configured to generate a spatial magnetic field which relative to external sensor means varies corresponding to the spatial position and orientation of the magnet and thus the first indicator means, the logging device comprises: - a sensor assembly comprising one or more sensors adapted to measure a magnetic field corresponding to at least two axes, - state sensor means adapted to detect whether the second indicator means is in the first or second indicator state, and - processor means configured to: (i) determine on the basis of measured magnetic field values a rotational position of the first indicator means, and (ii) calculate an expelled dose amount based on determined rotational positions of the first indicator means, - storage means adapted to store one or more dose amounts to create a log, wherein the calculated dose amount is based on rotational positions of the first indicator means determined when the second indicator means has been detected to be in the first indicator state. - a drug reservoir or means for receiving a drug reservoir, - drug expelling means comprising dose setting means allowing a user to set a dose amount of drug to be expelled, - actuation means actuatable between a first and a second actuation state, the first state allowing a dose amount to be set, the second state allowing the drug expelling means to expel a set dose, - first indicator means adapted to rotate during operation of the expelling means corresponding to an axis of rotation, the amount of rotation corresponding to the amount of drug expelled from a reservoir by the expelling means, and - second indicator means operatable between a first indicator state corresponding to the first actuation state, and a second indicator state corresponding to the second actuation state, - the first indicator means comprises a magnet moving together therewith, the magnet being configured to generate a spatial magnetic field which relative to external sensor means varies corresponding to the spatial position and orientation of the magnet and thus the first indicator means, - a sensor assembly comprising one or more sensors adapted to measure a magnetic field corresponding to at least two axes, - state sensor means adapted to detect whether the second indicator means is in the first or second indicator state, and - processor means configured to: (i) determine on the basis of measured magnetic field values a rotational position of the first indicator means, and (ii) calculate an expelled dose amount based on determined rotational positions of the first indicator means, (i) determine on the basis of measured magnetic field values a rotational position of the first indicator means, and (ii) calculate an expelled dose amount based on determined rotational positions of the first indicator means, - storage means adapted to store one or more dose amounts to create a log,