This question is written at the prodding of the CB (hi Zaxo!).

I'm tasked to develop something which will consolidate logfiles. Our environment is a diverse group of Windows 2000 (and one NT4) servers, of which only one, my application server, runs ActivePerl.

We have around two dozen IIS webservers, each with up to 8 different sites, hence up to 8 daily logfiles. In addition, we have several SMTP servers, and some other strange logfiles (ColdFusion, for one). These files do not all have a consistent naming scheme, location on server, or relationship between name/location and function. I need to take all these daily files, optionally compress them, process, rename, and move them to a single server, where they will eventually be moved to tape. My life is made somewhat easier by having the application server also be the logging server. I will be doing a pull from each server to the logging server.

Now, onto the real question. Originally, I had thought I would design a file type with one server / location / function per line, ala:
# my ugly flatfile # server1 D:\logfiles\w3svc3 application1 server1 D:\logfiles\w3svc4 application2 server2 E:\logfiles\w3svc3 application1
And then I could ($server, $location, $app) = split; it. There are some other bits of information I will probrally want to include.

But I am wondering: should I make the file be in an XML format and use XML::Parser or the like? What advantages/disadvantages does this have? I am a XML-n00b and unfamilar with it's correct applications.

Will an XML-format help me if I want to add a new data bit, like "compress" or "strip images if HTTP logile"?

Thanks be to you, Oh Hallowed Masters of all that it is Perl-fu...


<-> In general, we find that those who disparage a given operating system, language, or philosophy have never had to use it in practice. <->

In reply to To use XML or not to use XML by ibanix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.