>>3360 log(kx) is a function containing another function, so we use the chain rule to differentiate it.
Chain rule: f(g(x))` = g`(x) f`(g(x))
kx is our g`(x) in this case so the differential becomes
d(log(kx))/dx = d(kx)/dx * d(log(g(x))/dx
= k * 1/kx = k/kx = 1/x
You sometimes see it written with us and vs instead of fs and gs, especially when using the d/dx notation rather than primes. The way I was taught is that you differentiate inside the brackets first and differentiate everything but the brackets and then just multiply them together.