Erik,

If I understand, you just need:

    LOGFILE www.company1.com-access_log
    LOGFILE www.company1.com-access_log.Dec

As Emmet said, just put a LOGFILE command in your config for each file you want
to read. Or add them all on the command-line -- I think Stephen already answered
that.

For you Perl script try something like this:

@doit=<`pwd`/*_log>

foreach $let (grep /log[^\.]/, @doit) {
   $se=$let;
   $se=~s/\_log/\.sta/;

   if ($se eq $let) {
     print "Outfile equals infile!  Skipping.\n";
    }
   else {
     print "Doing $let\n";
    $lets = join ( ' ', grep( $let, @doit ) );
     `../analog/analog +C"HOSTNAME '$let'" $lets > $se`;
    }
}


HTH,


--
Jeremy Wadsack
Digital Media Consultant
___________________________
Wadsack-Allen Digital Group
http://www.wadsack-allen.com/digitalgroup/


Erik Kremsreiter wrote:

> Hey all, is there someone out there in Analog land that can help?
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Erik Kremsreiter
> Sent: Tuesday, January 18, 2000 10:27 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [analog-help] Multiple Logfiles
>
> No, they are in the same format.  The thing is we have logfiles for each
> company in the same directory.  Would it be possible to have it recognize
> two different logfiles for each company (again, the logfiles are in the same
> format, just that two machines are writing in their respective directories
> and my guess is the senior admin wants to then move them to a single
> directory and perform analog upon them creating the reports we would then
> email to the clients).  Would that be possible?
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Emmett Hogan
> Sent: Friday, January 14, 2000 9:51 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [analog-help] Multiple Logfiles
>
> Sure, you can have different log formats:
>
> Straight from the docs:
>
> The LOGFORMAT command only applies to logfiles specified with a
> LOGFILE command later in the same configuration file. So you must put
> the LOGFORMAT above the LOGFILE to which it refers. This way,
> different logfiles can have different formats, like this:
>
> LOGFILE log0
> LOGFORMAT format1
> LOGFILE log1
> LOGFORMAT format2
> LOGFILE log2
> LOGFILE log3
>
> In this example, log1 is in format1, log2 and log3 are in format2, and
> log0 isn't in either format -- analog will try and detect which format
> it's in.
>
> You should probably read the whole page about LOGFORMAT, you can find
> it at: http://analog.barringtons.com/docs/logfmt.html
>
> -Emmett
>
> On Fri, Jan 14, 2000 at 09:18:44AM -0800, Erik Kremsreiter wrote:
> > Okay, cool, second question and this one is relevant (at least I think it
> > is)
> >
> > We do our work through a perl script since the program is to process log
> > files that are for seperate companies that exist in the same directory.
> It
> > goes from one file to the next.  Is there anyway that you might know of to
> > get analog to process two different variants of a logfile for the same
> > company?
> >
> > ie
> >
> > www.company1.com-access_log
> > www.company1.com-access_log.Dec
> >
> > the other companies would have a similar setup as well.  This would be for
> > just this month since the changeover made some of the logfiles a bit
> screwy.
> > I'll include our perl script below for your perusal just in case it helps
> > clear up what I am saying above.
> >
> > #!/usr/local/bin/perl
> >
> > @doit=<`pwd`/*log>;
> >
> > #if !(-e hits) {
> > #  print "Generating general hit report \"hits\"\n";
> > #  system("wc -l *_log > hits");
> > #  print "Done.\n\n";
> > #}
> >
> > foreach $let (@doit) {
> >   $se=$let;
> >   $se=~s/\_log/\.sta/;
> >
> >   if ($se eq $let) {
> >     print "Outfile equals infile!  Skipping.\n";
> >   }
> >   else {
> >     print "Doing $let\n";
> >     `../analog/analog +C"HOSTNAME '$let'" $let > $se`;
> >   }
> >
> > }
> >
> > Hope that helps clear it up enough.
> >
> > Erik
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Emmett Hogan
> > Sent: Friday, January 14, 2000 8:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [analog-help] Multiple Logfiles
> >
> >
> > Sure you can...from the Analog docs:
> >
> > You can have several LOGFILE commands. You can include wildcards in
> > the logfile name (but not necessarily in the directory name: this is
> > system-dependent), and you can use a list of logfiles separated by
> > commas (without spaces). So the following commands would tell analog
> > to read logfile1, c:\logs\logfile2, and all files ending in .log:
> >
> > LOGFILE logfile1,*.log
> > LOGFILE c:\logs\logfile2
> >
> > Hope this helps,
> > Emmett
> >
> >
> > On Thu, Jan 13, 2000 at 03:30:37PM -0800, Erik Kremsreiter wrote:
> > > Hi there,
> > >
> > > I couldn't seem to find the answer anywhere in documentation... can
> > > Analog handle, assimilate and basically process two logfiles at the
> > > same time?  I know that Webtrends can, was curious if Analog could
> > > also and how that might be accomplished.




------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe analog-help" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------

Reply via email to