Getting the error log location in an efficient way
SELECT SERVERPROPERTY('ErrorLogFileName')


Actually it is an (undocumented) serverproperty,  which appears to work on SQL2005+ 

Joe Sack has a post on it