The argument of logarithmic function has to be positive, for the logarithmic function to exist.
We know that the domain of logarithmic function is (0 ; +infinite) and the codomain is R (real number set).
f(x) = log x
The argument could be the variable itself, or an expression, like in this case:
log (x^2 -6x + 5)
For the logarithm function to exist, we'll impose the constraint to argument:
x^2 -6x + 5 > 0
We'll find out the zeroes of the argument first:
x1 = 1 and x2 = 5
The argument is positive over the ranges:
[(-infinite 1)U(5;+infinite)] intersected (0;+infinite) = (0;infinite)
Of course, there are cases when the argument is positive for any real value of x, like in the case x^2 + x + 1.
x^2+x+1>0 for any value of x.
Conclusion: the argument of logarithmic function has to be positive, for the logarithmic function to exist.