the complex logarithm
The real logarithm answers a simple question: which power do I raise e to in order to get this positive number? We want the same idea for complex inputs: log w should be a complex number z with e^z = w. Setting it up is straightforward; the catch, which makes the complex logarithm genuinely new, is that there are infinitely many right answers.
Write w in polar form, w = r e^(i theta) with r = |w| > 0 and theta an argument of w. We want z = x + i y with e^z = e^x e^(i y) = r e^(i theta). Matching modulus gives e^x = r, so x = ln r, the ordinary real natural logarithm of the positive number r. Matching angle gives y = theta. But theta is only determined up to adding multiples of 2 pi, because the exponential is periodic with period 2 pi i. So the full answer is log w = ln|w| + i(arg w + 2 pi k) for every integer k. The real part is pinned down; the imaginary part is an infinite ladder of values spaced 2 pi apart.
So log is not a function in the ordinary single-valued sense until you make a choice. The pieces are honest and concrete: ln|w| is a genuine real logarithm of a positive number, and arg w is the angle. The new ingredient is the integer k, which records how many times you have wound around the origin. Note also that log 0 is undefined, since |0| = 0 and ln 0 makes no sense, matching the fact that e^z is never 0. To get a usable single-valued function you pick the principal logarithm or, more generally, a branch.
log(-1): here |-1| = 1 so ln|w| = 0, and arg(-1) = pi + 2 pi k, so log(-1) = i(pi + 2 pi k) = ..., -i pi, i pi, 3 i pi, .... Check: e^(i pi) = -1.
The real log of a negative number is impossible; the complex log of -1 has infinitely many values, all purely imaginary.
Do not write log of a complex number as if it were one number until you have fixed a branch. Identities like log(ab) = log a + log b only hold up to a multiple of 2 pi i, not on the nose.