Julia, 1818 24 bytes
n->ndigits(n^n,base=2)-1
port of Manish Kundu's answer
previous answer:
n->floor(log2(n)n)
input needs to be a BigInt
to avoid floating point errors.
Technically invalid because you need to augment the precision for very big numbers (with setprecision(2048)
for example for 10^100
)