Solved

From logfile to comma delimited format

Posted on 2004-09-08
7
170 Views
Last Modified: 2010-03-05
Hi All:

I have to write a transformation program that takes the log file and creates a comma seprated file from it. These log files parse source code and check for certain strings that point to the fact that some outside vendor's module is being used.

For example:
/votest/test_test/SOL4/jdk/lib/font.properties.ja:4:#Copyright(C) 1998-98 test Corp.
The first entry </votest/test_test/SOL4/jdk/lib/font.properties.ja>is the path of the included file
The second entry <4>is the Line number.
The third entry is the extra information on which the string we were looking for were found.

Now from these we have to create:

Suppiler Name
Suppier's Component
Component Version
Our Project in which component used
Our Product in which component used
Our Version
Open source or not
If license license number
Comments

Let me know how to write this transformation engine. Give me code format. Give me an efficient and solid format.
Let me know if I have to use Databases to retrieve information.

Let me know how these kinds of transformation work is generally done.

Best Regards

sunnybrad



0
Comment
Question by:sunnybrad
  • 4
  • 3
7 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 12012160
In your log example, what would be the values for:

Suppiler Name
Suppier's Component
Component Version
Our Project in which component used
Our Product in which component used
Our Version
Open source or not
If license license number
Comments

I certainly can't see how you would determine most of the this based on the information you've given.
0
 

Author Comment

by:sunnybrad
ID: 12012481
Dear Tintin:

Maybe from the file thats parsed out from the source we can find the above information.
It depends on the design. We can design it such that there could be database entry for the
for each file that is found. The information not there can be in the database.
Let me know if a text file would be better.

This is essentially design question just now. Let me know how to approach this solution.

Best Regards

sunnybrad

0
 
LVL 48

Expert Comment

by:Tintin
ID: 12012732
I'm confused.

Are you currently parsing the source?

Do you have real data that you can show?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:sunnybrad
ID: 12012933
Hi Tintin:

The source is currently being parsed. The output from that looks like the example I gave above:

/votest/test_test/SOL4/jdk/lib/font.properties.ja:4:#Copyright(C) 1998-98 test Corp.

This all I have in a log file. There are multiple files like this. From this I have to trigger all the information which I require either through a database or file. Let me know a efficient approach to this problem.

Best Regards

sunnybrad
0
 

Author Comment

by:sunnybrad
ID: 12012935
Hi Tintin:

Let me know if you need more information.

Regards

sunnybrad
0
 
LVL 48

Accepted Solution

by:
Tintin earned 500 total points
ID: 12012949
OK, so how on earth do you determine from the output from the parsed source the following items:

Our Project in which component used
Our Product in which component used
Our Version
Open source or not

There is no way possible of determining this unless I'm totally missing something obvious and there is more data than you're not showing me.
0
 

Author Comment

by:sunnybrad
ID: 12060448
The way I will approach this is to have datafiles, associating filenamre e.g.font.properties.ja to supplier name supplier component etc. The our project name will also come from the dir you are currently in. Sorry you did not had this information. I was looking for specaluative answers, you forced me to think !!.

Best Regards

sunnybrad
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now