function log1()

    turtle.dig()
    turtle.forward()
    
    height = 0    
    while turtle.detectUp() do
        turtle.digUp()
        while not turtle.up() do end
        height = height +1             
    end
         
    while height > 0 do
        while not turtle.down() do end
        height = height - 1             
    end
    
    print('Fuel left: '..turtle.getFuelLevel())
end

log1()