Generally speaking, Euler product type formulae involving logarithms can be derived (formally, at least) from Euler product formulae without logarithms via differentiation in the $s$ parameter.
In the specific situation, one can argue as follows.
For $s>0$ one has
$$ \sum_n \frac{\mu(n) g(n)}{n^s} = \prod_p (1 - \frac{g(p)}{p^s}) $$
$$ = \zeta(1+s)^{-1} \prod_p (1-\frac{g(p)}{p^s}) (1-\frac{1}{p^{1+s}})^{-1}.$$
The latter product equals $\prod_p (1-g(p)) (1-p^{-1})^{-1} + O(|s|)$ for $s>0$ small by the hypothesis on $\sum_{p \leq x} g(p)$. Thus the RHS is $s \prod_p (1-g(p)) (1-p^{-1})^{-1} + O(|s|^2)$ for $s>0$ small. This implies that $\sum_n \mu(n) g(n) = 0$ and $\sum_n \mu(n) g(n) \log n = - \prod_p (1-g(p)) (1-p^{-1})^{-1}$. Formally, this follows by differentiating both sides with respect to $s$ at $s=0$. To justify the calculation rigorously, first use (2.4) of Friedlander-Iwaniec to truncate $n$ to some large finite range $n \leq x$ and then perform a Taylor expansion of $\sum_{n \leq x} \frac{\mu(n) g(n)}{n^s}$ for some suitably small $s>0$ (e.g. $s = 1/\log^2 x$).