Need to know euler angles of Vector3 direction relative to other Vector3 direction

I tried this but it dont work as I expected(the results in euler had to be the same)...

Quaternion relative_rot = Quaternion.Inverse(transform.rotation) * Quaternion.LookRotation(Vector3.up);

        Vector3 relative_rot_euler = relative_rot.eulerAngles;

        Debug.Log("x,y,z : x1,y1,z1 "
            +transform.rotation.eulerAngles.x+", "
            +transform.rotation.eulerAngles.y+", "
            +transform.rotation.eulerAngles.z+" : "
            +relative_rot_euler.x+", "
            +relative_rot_euler.y+", "
            +relative_rot_euler.z           );

The primary idea is to measure deviation of direction in euler angles from one vector3 to another.

The problem may be that you're using Vector3.up as the (first) argument to LookRotation(), which is likely to produce an invalid result. The second (optional) argument to LookRotation() is the reference vector, which defaults to Vector3.up. If the input vector and the reference vector are parallel or nearly parallel (as is the case in the above code), the results are likely to be invalid.

I'm a little skeptical regarding the usefulness of expressing a relative rotation in Euler-angle form, but I'll just assume you have a good reason for wanting to do that.