Euler product for sum of multiplicative function times log

(Cross-posted from StackExchange). Let $g$ be a multiplicative function which satisfies $0 \le g(p) \ll 1/p$ and

$$\sum_{p\le x} g(p) = \log \log x + C + O((\log x)^{-10}).$$

Iwaniec and Friedlander claim the following product identity (equation 1.14). Why is it true?

$$-\sum_n \mu(n)g(n)\log n = \prod_{p} (1-g(p))(1-p^{-1})^{-1}$$

Even the case $g(n)=1/n$ is not clear to me.

-

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$).