It's well know that $a \frac{x}{\log x}\le \pi(x) \le b \frac{x}{\log x}$ for some constant $a,b \in \mathbb{R}$.
There are a lot of ideas to prove it, but I've saw an exercise with following statement :
Prove that if $\sum_{p \le x} \frac{\log p}{p} - \log x = \lambda + o(1)$ , then asymptotic law holds.
I don't know where is the connection between them?