Get player orientation, but only one Euler angle is non-zero

I am trying to retrieve the player orientation using the following snippet, which is run again at every frame:

 Transform transform = GameObject.FindGameObjectWithTag("Player").transform;
 Debug.Log("euler: " + transform.eulerAngles.x + "|" + transform.eulerAngles.y + "|" +     transform.eulerAngles.z);

Unfortunately, however, only one of the Euler angles (more specifically y) appears to be changing even though I am moving the player orientation along multiple axes. I looked into the Quaternion itself (and studied the theory of Quaternions too) but I see the same problem. Any idea what could be the problem?

For a player orientation having only a change in Y does make sense. It would allow the player to rotate around 360 degrees. Now if you are tilting him sideways or backwards/forward, having only the Y component change is indeed strange.

I think I found a solution to my own problem. What I was looking for is the orientation of the camera, not of the player. The orientation of the player stays fixed in a direction parallel to the ground (that is why the only the y component was non-zero), even if I am using the mouse to look e.g. in an upward direction. All I needed was to replace

Transform transform = GameObject.FindGameObjectWithTag("Player").transform;

with

Transform transform = Camera.main.transform;