<p>We log values and we only log them once in a table. When we add values to the table we have to do a look up everytime to see if it needs to insert the value or just grab the id. We have an index on the table (not on the primary key) but there are about 350,000 rows (so it is taking 10 seconds to do 10 of these values). </p>

<p>So either   </p>

<ul>
<li>We figure out a way to optimize it </li>
<li>Strip it this feature out or </li>
<li>Do something completely different when logging these values.</li>
</ul>

Just to be clear, the index is on the (presumably varchar or nvarchar) field in the table, correct? Not the PK?
ok, after your edit: You're doing an indexed lookup on a large (n)varchar text field. Even with the index that can be pretty slow -- you're still doing 2 big string comparisons. I can't really thing of a great way to do this, but some initial SWAGS:
compute a hash of the to-be-logged text, and store that in the database for subsequent lookups
as another poster suggested, store all of the rows, and filter out dupes in the query (or with a nightly batch, whatever
don't check for duplicates. Catching an exception may still be cheaper than the lookup*
hire someone with a really good memory who's fast with a mouse. When a message is going to be logged, flash it to their screen with an accept/deny prompt. If the entry is a dupe, ahve them click "deny"
* yeah, I know I'll be down-modded for that, but sometimes pragmatism just works.