With reference to this post, can one define
0 Log = 0 in Mathemtica?
You can use
expr = (1 - x) Log[1 - x]; iexpr = expr /. Log -> Inactive[Log];
Now, insert a number, activate after numeric evaluation of everything but Log.
iexpr /. x -> -2. // Activate (* 3.29584 *)
Because you've controlled the order of evaluation, the troublesome case becomes zero.
iexpr /. x -> 1. // Activate (* 0. *)
Activate not needed in this special case, but harmless.
This works for exact numbers and machine numbers. For controlled precision, you'll need to do more.
You can define
s[0|0.] = 0; s[x_] = -x*Log[x]; SetAttributes[s, Listable]
and then use the function
s instead of
x Log[x]. If you also have values of $x<0$ then other definitions should be added.