As the OP mentioned in a comment, pattern matching has difficulties with something more complex, such as
1/a*Log[(3*Sqrt[1-x])^a]
where $(3 \sqrt{1 - x})^a$ is interpreted as $3^a (1-x)^{a/2}$. It is possible to create something more general that will cover this case, and a few others. To do so is significantly more complicated, as follows:
1/a*Log[(3*Sqrt[1-x])^a] /.
Log[ a_Power b___Power ] :>
Module[{bases, exps, common},
{bases, exps} = Transpose[List @@@ {a, b}];
common = exps /. {(p_ | p_ ___) ..} :> p;
common Log[ Times @@ Power @@@ Transpose[ {bases, exps/common} ]]
]
Because of the implicit simplification going on, we have to get creative in extracting out the common terms. First, we need to be able to get at the individual exponents of each term, hence the pattern
Log[ a_Power b___Power ]
which I use to split the bases and the exponents into two separate lists, via
{bases, exps} = Transpose[List @@@ {a, b}];
Once that's done, I use a second pattern to extract the common term from the exponents. In my limited search, I could not come up with a more straightforward method, although it likely exists. Lastly, I re-construct the expression.
As a general caution, this explosion in complexity is a perennial problem with these types of structural changes. They are often difficult to construct, and likely to fail with small deviations from the prescribed pattern. Consider what happens if the above replacement rule is applied to Log[3^b*Sqrt[1 - x]^a]/a
, instead:
{(b Log[3 (1 - x)])/a, 1/2 Log[3 (1 - x)]}
It completely breaks without any fail over into something workable.