I have a log file like this:
2008-07-24 17:20:33 W [prog.c:415:prog _cleanup_and_ex it] server:
shutting down server
2008-07-24 17:20:33 W [prog.c:415:prog _cleanup_and_ex it] client:
shutting down client
I need to parse this using php. I have split them by spaces and
everything is put into an array. The problem comes at the end of the
line. Eg. In line 1, server: shutting down server will be parsed as 4
different array values. This will make things ugly when the warning
message is long. Is there any way where I could just display the rest
of the message from a certain point in the line.
regards,
Anush
2008-07-24 17:20:33 W [prog.c:415:prog _cleanup_and_ex it] server:
shutting down server
2008-07-24 17:20:33 W [prog.c:415:prog _cleanup_and_ex it] client:
shutting down client
I need to parse this using php. I have split them by spaces and
everything is put into an array. The problem comes at the end of the
line. Eg. In line 1, server: shutting down server will be parsed as 4
different array values. This will make things ugly when the warning
message is long. Is there any way where I could just display the rest
of the message from a certain point in the line.
regards,
Anush
Comment