Of the many ways $\log$ can be defined, one is $\log x = \int_1^x\!\frac{1}{t}\,dt$ (I'm assuming you mean natural log, but if not, everything can be easily adapted, since $\log_n x = \log x/\log n$). Letting $x > 1$ and interpreting $\int_1^x\!\frac{1}{t}\,dt$ as the area under the graph of $1/x$ from $1$ to $x$, we see that since $1/x$ is positive for $x > 0$, the integral will also be positive for $x > 1$. However, if $x\in(0,1)$, we use the properties of the integral to see that
$$
\int_1^x\!\frac{1}{t}\,dt = -\int_x^1\!\frac{1}{t}\,dt.
$$
The integral $\int_x^1\!\frac{1}{t}\,dt$ is greater than $0$, because again we can interpret it as the area under $1/x$ from $x$ to $1$. This implies that $\log x < 0$ whenever $x\in(0,1)$. So, $\log(.05)$ and $\log(.049999\dots)$ are less than $0$.
I also feel the need to remark that $.05$ and $.04999\dots$ are the same number, so you shouldn't be getting a positive answer for one's log and a negative answer for the other's log, you should be getting the same answer. (You probably computed $\log(.49999\ldots9)$ for finitely many $9$'s, but as I explained above, this should also be negative.) The reason that these two numbers are the same is exactly the same as the reason $.99999\ldots = 1$, and we already have plenty of threads on that, so you can check one of those out if you are in doubt of this fact.
As for how $\log$ is calculated, it's usually tough to compute $\log x$ by hand for some random $x$, but you can approximate it by integral approximation methods, or expand $\log$ in a Taylor series near $x$, and use only finitely many terms of the series to get an approximation (this is likely what your calculator does).