How to solve a differential equation $y=xy'+\ln y',\ \ y(-1)=-1$ 
I have to find a particular solution to the following differential equation:
  $$
y(x)=xy'+\ln y',\ \ y(-1)=-1
$$

My attempt:
$$
\begin{aligned}
&y'=t(x)\Rightarrow y=xt+\ln t\Rightarrow y'_x x'_t=tx'_t=x'_t t+x+\frac{1}{t}\Rightarrow x+\frac{1}{t}=0\Rightarrow\\
&\Rightarrow t(x)=-\frac{1}{x}\Rightarrow y=\frac{x}{-x}+\ln\left(\frac{1}{-x}\right)\iff y(x)=-1-\ln(-x).
\end{aligned}
$$
In the end, my general solution matches the particular one. Is it fine or did I make a mistake?
 A: This is a Clairaut equation
$$
y=xy'+f(y')
$$
with a family of linear solutions $y'=C$,
$$
y=Cx+f(C)
$$
and the singular solution / envelope $x=-f'(y')$ which can be solved here as $y'=-\frac1{x}$, which is only valid for $x<0$ as only positive $y'$ are admissible as arguments for the real logarithm. Inserted this gives
$$
y=-1-\ln|x|, ~~ x<0.
$$
At points of tangency, one can switch from one solution to the other, so that there is also an infinite amount of composite solutions with linear and logarithmic segments.

Your error is that you can only solve $y'(x(t))=t$ whenever the derivative is not constant, you need a strictly monotonous segment for this parametrization. You have hidden this parametrization in the formula $y'(x)=t(x)$, but you use the inverse way in the chain rule application $\frac{dy}{dt}=y'_xx'_t=y'(x(t))x'(t)$.
A: I will give a more accurate and complete answer now! This is Clairaut's equation, so let's go ahead
$y'=p$ , $y=xp+ln(p)$
$y'=p=p+p'(x+p^{-1})$
$p'(x+p^{-1})=0$
so $p'=0$ , $p=c$ , $y=cx+ln(c)$
$y(-1)=-1$
$-1=-c+ln(c)$ so $c=1$
$y=x$
$x+p^{-1}=0$ , $p=-x^{-1}$
$y=-xx^{-1}+ln(-x^{-1})=-1+ln(-x^{-1})$
then Both answers : $y=x$ or $y=-1+ln(-x^{-1})$
