image is uint8, so the 1 + image happens in uint8 arithmetic. Therefore 256 becomes 0.
Also, that formula is different. This one reflects the original formula:
c = 255 / np.log(1 + np.max(image.astype(np.float32)))
log_transformed = c * np.log(1 + image.astype(np.float32))
log_transformed = np.clip(log_transformed, 0, 255).astype(np.uint8)