ci sono tanti modi, questo è uno

select colonne fom log on where src=(select nome from usr where nick=variabile_nick) or dst=(select nome from usr where nick=variabile_nick)