Please help me with this trigonometric limit without using L'Hopital's rule I need to solve the following limit without using L'Hopital's rule:

$$\lim _{x\to 0}\left(1+\sin\left(x\right)\right)^{\frac{1}{x}}$$

The thing is that I can not figure out what to do. One of my ideas was to apply this rule: $a^x=e^{\ln \left(a^x\right)}=e^{x\cdot \ln \left(a\right)}$, getting this:

$$\lim _{x\to 0}e^{\frac{1}{x}\ln \left(1+\sin \left(x\right)\right)}$$

I already know that the answer is $e$, so the exponent is definitely 1. However, I tried everything I could but have no idea how to solve $\lim _{x\to 0}\left(\frac{1}{x}\ln \left(1+\sin \left(x\right)\right)\right)$ which needs to be 1.

I would  really appreciate your help, and if you find a totally different way to solve the limit without using L'Hospital's rule it will be good as well.
Consider the function $f\colon(-\frac{\pi}{2},\frac{\pi}{2})\to(-1,1)$ defined by
$$
f(x) = \ln(1+\sin x)\,.
$$

We have that $f(0)=0$, $f$ is continuously differentiable, and $f'(x) = \frac{\cos x}{1+\sin x}$ by the chain rule; so that
$$
\lim_{x\to 0} \frac{\ln(1+\sin x)}{x}=\lim_{x\to 0} \frac{f(x)-f(0)}{x} =  f'(0) = \frac{\cos 0}{1+\sin 0} = 1
$$
so that by continuity of $\exp$
$$
\lim_{x\to 0} e^{\frac{1}{x}\ln(1+\sin x)} =  e^{\lim_{x\to 0} \frac{1}{x}\ln(1+\sin x)} = e^1 = e\,.
$$
We have 

$$\left(1+\sin x\right)^{\frac{1}{x}}=\left[\left(1+\sin x\right)^{\frac{1}{\sin x}}\right]^{\frac{\sin x}{x}}\to e^1=e$$