MyITGuy
3/24/2014 - 8:56 PM

LogParser Examples

LogParser Examples

logparser "SELECT * FROM 'D:\LogFiles\W3SVC1\u_ex140121.log' WHERE [cs-uri-stem] LIKE '%PostEvent.aspx'" -o:DataGrid
logparser "select to_timestamp(date,TO_LOCALTIME(time)) as datetime, [c-ip], [cs-username], [s-computername], [s-ip], [s-port], [cs-uri-stem], [sc-status], [sc-substatus], [sc-win32-status], [cs(User-Agent)] FROM 'C:\inetpub\logs\LogFiles\W3SVC2\u_ex1806*.log' WHERE [cs-username] IS NOT NULL AND to_timestamp(date,time) >= timestamp('2018-06-11 13:43:00', 'yyyy-MM-dd hh:mm:ss')" -o:DATAGRID -i:iisw3c
logparser "select [date], [time], [c-ip], [cs-username], [s-computername], [s-ip], [s-port], [cs-uri-stem], [sc-status], [sc-substatus], [sc-win32-status], [cs(User-Agent)] FROM 'C:\inetpub\logs\LogFiles\W3SVC2\u_ex1806*.log' WHERE [cs-username] IS NOT NULL AND [date] >= '2018-06-11' AND [time] >= '13:43:00'" -o:DATAGRID -i:iisw3c