With xp_readerrorlog, we can only read 1 error log at time by using the first parameter to specify the file extension and the second to specify whether we wish to read the SQL Server Errorlog or the SQL Agent Errorlog. To read all the logs we just need to loop through reading all the logs and load them into a table (or return multiple result sets if we are ok with this). Below is a script that does just this:
if exists (select * from tempdb.sys.tables where name like '#Errorlog%')
drop table #Errorlog;

create table #ErrorLog
LogDate datetime,
ProcessInfo nvarchar(16),
[Text] nvarchar(2048)

declare @p1 nvarchar(64);
declare @p2 nvarchar(64);
declare @logNum int;
declare @NumErrorLogs int;

-- add search conditions here
select @p1 = null;
select @p2 = null;

--get the value of max errorlogs from registry
exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorLogs', @NumErrorLogs OUTPUT

-- init counter
set @logNum = 0;

while (@logNum <= @NumErrorLogs)
declare @exists int
exec xp_fileexist 'c:\windows\notepad.exe', @exists out
if (@exists = 1)
insert into #Errorlog
exec xp_readerrorlog @logNum, 1, @p1, @p2
select @logNum = (@logNum + 1);

select * from #ErrorLog

Briefly, we check to see if the table exists, if it does DELETE it. Then create a temporary table to hold our executions of xp_readerrorlog. Next, we read the registry to get the configured max number of Errorlogs for our loop. Then we loop and load each execution into the temporary table. Once everything is in the temporary table we can obviously narrow down items further by adding a predicate to our SELECT statement.

You could encounter a problem with this for servers that do not have all the log files configured by the maximum value set in SSMS. This situation would arise with new servers and with servers that have recently had this value increased. Therefore, with each loop we test to verify the file exists before attempting to execute xp_readerrorlog with xp_fileexist.

Remember, there are many ways to accomplish this. I hope this is useful for those that like using xp_readerrorlog.

from Jay's notes on SQL