Fallen trees are a common obstacle when riding through a forest. The right way to tackle them is to stand on the foot pegs, preload the suspension and twist the throttle as the motorcycle is rebounding so that the front wheel becomes lighter. This lets the front wheel climb the log easily.
However, the crucial thing here is speed. You need to be fast enough so that the front wheel lands far from the log and not just after it. If the front wheel bounces off the log and slams down to the ground immediately after it, you now have a bigger problem to deal with. You need to get the rear wheel across the log from a stand still position. You also run the risk of smashing the underbelly of your engine on the log.
But if you have enough speed you will find that when the motorcycle is coming down the front wheel is already way ahead of the log and the motorcycle is pressing the rear wheel on to the log. At that instant if your throttle is kept twisted, the engine should oblige you with the traction you need and both wheels will jump off over to the other side.
When crossing obstacles like logs, I prefer sitting on the seat instead of standing on the pegs because when the front wheel is in the air all my weight gets transferred to the rear wheel. It becomes more difficult for the tyre to slip when its forced down onto something hard. This results in greater traction that is needed for the rear wheel to cross the obstacle. It yields a bumpy ride, but the technique is useful when riding low powered motorcycles or motorcycles that sport tyres not designed for off-road use.