In[]:=
expr=Log
n
∏
i=1
a
i
*
b
i

Out[]=
Log
n
∏
i=1
a
i
b
i

In[]:=
logProductRule:=Log[Product[subExpr_,{index_,from_,to_}]]:>Sum[Log[subExpr],{index,from,to}]
In[]:=
TreeForm[expr]
Out[]//TreeForm=
In[]:=
InputForm[expr]
Out[]//InputForm=
Log[Product[Subscript[a, i]*Subscript[b, i], {i, 1, n}]]
In[]:=
expr/.logProductRule
Out[]=
n
∑
i=1
Log[
a
i
b
i
]