You should check to see if the number is prime before calculating its log and then add the value of log(x) to a variable logsum like this:
from math import *
logsum = 0
n = raw_input('This is a logarithm ratio tester. Which number do you want to test? ')
for x in range(2,n): #picks numbers to test
isprime = True
for divisor in range(2, 1+int(sqrt(x+1))):
if x%divisor == 0: #checks if x is prime
isprime = False #computes log of prime
break
if isprime:
logsum += log(x)
Also, since you're checking a lot of values, maybe implementing The Sieve of Eratosthenes would be a nice way to continue learning.
EDIT: Using Juri Robl's suggestion, the code could be simplified to:
from math import *
logsum = 0
n = raw_input('This is a logarithm ratio tester. Which number do you want to test? ')
for x in range(2,n): #picks numbers to test
for divisor in range(2, 1+int(sqrt(x+1))):
if x%divisor == 0: #checks if x is prime
break
else:
logsum += log(x)