I was reading about the Riemann Zeta Function when they mentioned the contour integral $$\int_{+\infty}^{+\infty}\frac{(-x)^{s-1}}{e^x - 1} dx$$ where the path of integration "begins at $+\infty$, moves left down the positive real axis, circles the origin once in the positive (counterclockwise) direction, and returns up the positive real axis to $+\infty$." They specified that $(-x)^{s-1} = e^{(s-1)\log(-x)}$ so that $\log(-x)$ is real when x is a negative real number. Furthermore, $\log(-x)$ is undefined when x is a positive real number as a result of this choice of $\log$.
They proceeded to evaluate the integral by splitting it into $$\int_{+\infty}^{\delta}\frac{(-x)^{s-1}}{e^x - 1}dx + \int_{|x|=\delta}\frac{(-x)^{s-1}}{e^x - 1} dx + \int_{\delta}^{+\infty}\frac{(-x)^{s-1}}{e^x - 1} dx$$ I do not understand the justification for the path of the second integral; if $(-x)^{s-1}$ is undefined on the non-negative real axis, how can the path of integration cross the real axis at $x=\delta$, when $\delta$ is implicitly non-negative?
EDIT: I am aware that $\log(-x)$ is defined on the entire plane except for some ray from the origin. What I am specifically confused about is how the contour is allowed to cross the ray on which $\log(-x)$ is undefined.
EDIT: They describe the first and third integrals of the sum as being taken "slightly above" and "slightly below" the positive real axis as the function is undefined on the positive real axis.
Here is a picture that matches the description of the path of integration:
Note that we are taking the positive real axis as the branch cut for $\log(-x)$, and we have taken the branch of $\log(-x)$ whose argument goes from $-\pi$ to $\pi$.
The red and blue lines should be infinitesimally above and below the positive real axis.