When integrating (sec x)^2 / (1 - tan x) I obtained ln(mod(1-tan x)) for this using the substitution u=tan x. Why does Wolfram obtain the same result but it is negative? Why does it not use the modulus function? The final result for restricted x values I don't understand.

integrate[(sec x)^2 / (1 - tan x)] - Wolfram|Alpha