You can roll the log until one of the roof planes you are trying to define is level and nail or screw a 1x4 to both ends of the log with the top edge of the 1x aligned with the roof plane layout line. Make sure the 1x is is long enough to stick out on either side of the log a foot or more.
Then you can stretch a string along side the log nice and tight and use a level to locate points on both sides of the log that define the plane you are trying to create.
once you have marks every 10' or so (or more closely if there are irregularities in the log) you can snap the line on the surface of the log. Be sure to pull the string perfectly level as you snap it.
Once you have lines on both sides of the log it's a matter of removing everything above that line. Either freehand rip it or cut into the log every foot or so down to the line (stay 1/4" above it to avoid going to deep) and split the pieces in between off. Then rescore and hew as normal.
Alternatively, if you have a rotary laser level, you can use it instead of the 1x's and string method. You'll have to move the laser to the other side of the log and fiddle with the elevation of the laser until it's lined up. That's how I'd do it.
A 40' log can have a bit of flex to it. Make sure you support the log approximately where it will be supported in the final structure to avoid introducing sag or crown inadvertently.
Good luck and keep us updated. Photos would be great.