Not quite. If the odds are infinitely favorable, the log wealth is maximized when you bet 0.1% of your wealth. Any fractions other than that produce inferior results. This might be counter-intuitive but actually can be easily proven by basic calculus.
If you still doubt it, you can just compute it to be sure! For example, if odds is indeed 1:googol (1:10^100), the log wealth for betting 99.99% is -6.67, less than betting 0.1% which produces 2.52.
Maximizing log wealth will require taking such bets at less than 100% of your current wealth, provided the payout is high enough. That's easily proven with simple algebra: if you start with X, taking a bet requiring 99.99% of X and paying Y:1 and a probability of Z of paying out, then expected log value of taking it is log(X/10,000)(1-Z)+log((YX*9999/10000)+X/10,000)(Z). This goes to infinity as Y goes to infinity.
* You're assuming the winning probability p does not decrease as the odds Y goes up. This is a silly assumption. Do you really believe that the probability is all the same when "Hay I will pay you 2000 livres tomorrow" and "Hay I think I can pay you a infinite amount of livres tomorrow"? * For example, if p = 1 / (odds), then E(log) never goes to infinity.
If you really assume that there is 1/10000 chance that the mugger can pay you an infinite amount of money, then ...... why not? You can just start a hedge fund on that. You'll gather 100000 people and make them bet independently with muggers, then there is 99.99% of chance that someone actually gets an infinite amount of returns. Now everyone is happy receiving an infinite amount of money.