Step 1: Use substitution.
Let \( u = \log x \). Then, \( du = \frac{1}{x} dx \), and the integral becomes:
\[
\int \frac{(1 + u)}{\cos^2 u} \, du
\]
Step 2: Solve the integral.
The integral simplifies to:
\[
\int (1 + u) \sec^2 u \, du = \tan u + c = \tan(\log x) + c
\]
Step 3: Conclusion.
Thus, the integral evaluates to \( \tan(\log x) + c \), corresponding to option (D).