Find the derivative of $y=(\tan (x))^{\log (x)}$ Find the derivative of $y=(\tan (x))^{\log (x)}$

I thought of using the power rule that:
$$\dfrac {d}{dx} u^n = n.u^{n-1}.\dfrac {du}{dx}$$
Realizing that the exponent $log(x)$ is not constant, I could not use that.
Note that $$\log(y) = \log(x).\log(\tan(x))~.$$ Now, apply chain rule on both sides.
$(\tan(x))^{\ln(x)}=\exp(\ln x(\ln(\tan x)))$ by apply the formula off the derivative of a composition:

$f'(x)=(\ln(x)\ln(\tan(x))'\exp(\ln(\tan(x))$.

$(\ln(x)(\ln(\tan(x)))'={1\over x}\ln(\tan(x))+\ln(x){1\over {\tan(x)}}{1\over{cos(x)^2}}$.