Step 1: Use the property of logarithms.
We start by simplifying the given integral. Using the property of logarithms \( \log \left( \frac{a}{b} \right) = \log a - \log b \), we can rewrite the integrand:
\[
\int_0^{\frac{\pi}{2}} \left( \log(5 + 4 \sin x) - \log(5 + 4 \cos x) \right) \, dx
\]
Step 2: Split the integral.
Now, we split the integral into two parts:
\[
\int_0^{\frac{\pi}{2}} \log(5 + 4 \sin x) \, dx - \int_0^{\frac{\pi}{2}} \log(5 + 4 \cos x) \, dx
\]
Step 3: Symmetry of the integral.
Notice that the integrals are symmetric with respect to sine and cosine. In fact, by the symmetry of the interval \( [0, \frac{\pi}{2}] \), we know that:
\[
\int_0^{\frac{\pi}{2}} \log(5 + 4 \sin x) \, dx = \int_0^{\frac{\pi}{2}} \log(5 + 4 \cos x) \, dx
\]
Step 4: Conclusion.
Since both integrals are equal, we subtract them:
\[
\int_0^{\frac{\pi}{2}} \log(5 + 4 \sin x) \, dx - \int_0^{\frac{\pi}{2}} \log(5 + 4 \cos x) \, dx = 0
\]
Step 5: Final Answer.
Therefore, the value of the integral is \( 0 \).