Get rotation around (forward) axis ?

How can I read the rotation of a transform/quaternion around a specific axis?

edit: optimal would be to have a direction vector AND an angle!

Thanks

Direction is transform.forward

Rotation is transform.localEulerAngles.z