  The classical Mertens' formula states that $ \prod_{p\le
N}\big(1-\frac1p)^{-1}\sim e^\gamma\log N, $ where the product is over all
primes $p$ less than or equal to $N$, and $\gamma$ is the Euler-Mascheroni
constant. By the Euler product formula, this is equivalent to either of the
following statements: $$ \begin{aligned} &i.
\lim_{N\to\infty}\frac{\sum_{n:p|n\Rightarrow p\le
N}\thinspace\frac1n}{\sum_{n\le N}\frac1n}=e^\gamma\ \ &ii.
\sum_{n:p|n\Rightarrow p\le N}\thinspace\frac1n\sim e^\gamma\log N.
\end{aligned} $$ Via some random integer constructions and a criterion for weak
convergence of distributions to so-called generalized Dickman distributions, we
obtain some generalized Mertens' formulas, some of which are new and some of
which have been proved using number-theoretic tools. For example, in the spirit
of (i), we show that if $A$ is a subset of the primes which has natural density
$\theta\in(0,1]$ with respect to the set of all primes, then $$
\lim_{N\to\infty}\frac{\sum_{n:p|n\Rightarrow p\le
N\thinspace\text{and}\thinspace p\in A}\frac1n} {\sum_{n\le N:p|n\Rightarrow
p\in A}\frac1n}=e^{\gamma\theta}\Gamma(\theta+1), $$ and also, for any $k\ge2$,
$$ \lim_{N\to\infty}\frac{\sum^{'(k)}_{n:p|n\Rightarrow p\le
N\thinspace\text{and}\thinspace p\in A}\frac1n} {\sum^{'(k)}_{n\le
N:p|n\Rightarrow p\in A}\frac1n}=e^{\gamma\theta}\Gamma(\theta+1), $$ where
$\sum^{'(k)}$ denotes that the summation is restricted to $k$-free positive
integers. In the spirit of (ii), we show for example that
  $ \sum^{'(k)}_{n:p|n\Rightarrow p\le
N}\frac1{n_{\{(k-1)-\text{free}\}}\phi(n_{\{(k-1)-\text{power}\}})}\sim
e^\gamma\log N, $ where $\phi$ is the Euler totient function, and
$n_{\{(k-1)-\text{free}\}}$ and $n_{\{(k-1)-\text{power}\}}$ are the
$(k-1)$-free part and the $(k-1)$-power part of $n$.
