As Szabolcs points out in the comments, you can't do this the way you would like because it isn't a display rule but an evaluation rule that causes Log[x,y] to turn into Log[y]/Log[x]. You can try to edit the display for this expression after the fact but it quickly becomes intractable; to demonstrate, we could overload the MakeBoxes function for the fraction form:
MakeBoxes[expr : Log[x_]/Log[y_], form_] := MakeBoxes[Log[y, x], form];
Log[x,y]
Log[x,y]
This works, but if we enter something a little more complicated...
2*Log[x,y]
2 Log[y] / Log[x]
This happens because the latter expression gets evaluated into Times[2, Log[y], Power[Log[x], -1]] which is then passed to MakeBoxes, and this expression doesn't match MakeBoxes argument. We could further modify MakeBoxes:
MakeBoxes[Times[a___, Log[x_], b___, Power[Log[y_], -1], c___], form_] :=
MakeBoxes[#, form] &@Times[a, HoldForm[Log[y, x]], b, c];
MakeBoxes[Times[a___, Power[Log[y_], -1], b___, Log[x_], c___], form_] :=
MakeBoxes[#, form] &@Times[a, HoldForm[Log[y, x]], b, c];
10*Log[3,4]/2
5 Log[3,4]
But even here we get unexpected results when the expression gets a little more complicated:
Exp[2 * Log[3, 4]]
4 ^ (2 / Log[3])
I think this result is preferable to leaving Log[3,4] in the exponent, but the point is that you won't be able to control the display of this function very easily.
Another thing that might occur to someone is to overload how Log actually works; something like this:
(* This is a bad idea! *)
Unprotect[Log];
Log[x_, y_] =.;
Log /: N[Log[x_, y_]] := N[Log[y]/Log[x]];
I doubt that code would work, but even if it did and you could successfully handle all the cases in which Log is passed to N, you would probably break all sorts of Mathematica internals like Solve, Minimize, Simplify, etc., all of which expect Log to simplify itself.
Log[3, 4]gets evaluated toLog[4]/Log[3]immediately. This is not done bySimplify. It is an evaluation rule ofLog. – Szabolcs May 13 '17 at 11:33HoldForm[Log[3,4]]. It stays as it is, but it cannot be used for computations. It is for display purposes. An end result could be post-processed usingLog[x_]/Log[y_] -> HoldForm@Log[y, x]to put it back into the form you wanted. There's alsoInactive, e.g.Inactive[Log][3, 4].Inactiveis usable in some computations, but I am not sure it is helpful here. – Szabolcs May 13 '17 at 11:43