Please remember I am new to Perl. I am trying to understand your code examples but have not been able to get it to work in any way. I did go through and looked up the code to understand it but I am missing somthing. I dont want every white space to seperate just the first few then the error message. One of the lines doesnt have a seperate severity like INFORMATION but an info: in the line. So the spot for info: I would be able to pull out error: if it was an error. I am still trying to use $1 $2 $3 to understand and find the positions to place where I want them but unsuccessful. I do understand the higher numbers would pull nothing but are there because I am trying to break it up and see what is there as I go to see if I missed one. Also $0 printed the file location which is a good separator when going through the results.
Ok maybe this will help explain what I am trying to do. Here is the data and the desired output for both line formats leaving out unnecessary info.
__data__ Mon Feb 20 09:31:25 2017 [INFORMATION] [AGENTEXEC 26816] Detected duri +ng program initialization: Version: 7.2.0160.0297 Win64 2017-02-20T09:30:53.177000 20848[30892] 0000000000000000 [DM_ +MQ_I_DAEMON_START]info: "Message queue daemon (tid : 27944, session +0102b20d80000456) is started sucessfully."
| Server Name | 2017-02-20 | 09:30:53 | info: | DM_MQ_I_DAEMON_START info: "Message queue daemon (tid : 27944, session 0102b20d80000456) is started sucessfully." |
| Server Name | 2017-02-20 | 09:31:25 | INFORMATION | Detected during program initialization: Version: 7.2.0160.0297 Win64 |
I do appreciate your time for helping and explaining this to me.
In reply to Re^4: DateTime::Format::Flexible; for Log Parse with multiple formatted lines
by TCLion
in thread DateTime::Format::Flexible; for Log Parse with multiple formatted lines
by TCLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |