Fourier series of Log sine and Log cos

Recall that $$\cos(2kx) = \dfrac{e^{i2kx} + e^{-i2kx}}2.$$ Hence, $$\begin{aligned}\sum_{k=1}^{\infty} \dfrac{\cos(2kx)}k &= \sum_{k=1}^{\infty} \dfrac{e^{i2kx} + e^{-i2kx}}{2k} \\&= \dfrac12 \big(-\log (1-e^{i2x} )-\log (1-e^{-i2x} ) \big) \\&= - \dfrac12 \log \big(2 - 2\cos(2x) \big) \\&= - \dfrac12 \log\big(4 \sin^2(x)\big) \\&= - \log 2 - \log\big(\sin(x)\big).\end{aligned}$$ Hence, $$-\log\big(\sin(x)\big) = \sum_{k=1}^{\infty} \dfrac{\cos(2kx)}k + \log 2.$$ I leave it to you to similarly prove the other one. Both of these equalities should be interpreted $\pmod {2 \pi i}$.