« Previous Next »

Thread: Logparser can't read MS Fax log .???

Last post 10-14-2008 1:13 AM by Eddy-dd. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 10-10-2008, 6:54 AM

    • Eddy-dd
    • Not Ranked
    • Joined on 10-10-2008, 6:47 AM
    • Posts 3

    Logparser can't read MS Fax log .???

    Hello,

    For a new auto fax application im trying to read in the fax logging while searching for a certain field.
    I thought to do this with Logparser cause the log i want to read is coming from Ms Fax

    Still, i can't seem to get it running, always returning a header file.

    am i'm looking over something or is it just possible that Logparser can't read this kinda file

    I have placed the logfile on following url in case somebody wants to help me out with this problem:

    http://www.em-design.be/school/outboxlog.zip

    I'm already 2 days stuck on this problem.

    Wkr,

    Eddy

  • 10-10-2008, 8:24 AM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 7:17 AM
    • Johannesburg, South Africa
    • Posts 84

    Re: Logparser can't read MS Fax log .???

    Hi Eddy, 

    Here is a statement that extracts the number of retries out of your log where they are > 1;

    logparser "select * from outboxlog.txt where to_int(\"Retries\")>1" -i:tsv

    Note that I had to use the backslash to escape the quotes and used to_int to convert the Retires.If you just want to see a particular field, just use it in the select with the same escaping of quotes. If you have specifics, let us know and we'll see what we can do.

    In the options in the application, is there not different formats you can use? A proper csv would obviously work better. 

    Hope this helps anyway. 

    Cheers, Dave 

    Yes, dear
  • 10-10-2008, 8:56 AM In reply to

    • Eddy-dd
    • Not Ranked
    • Joined on 10-10-2008, 6:47 AM
    • Posts 3

    Re: Logparser can't read MS Fax log .???

    Hi Dave, tnx for the quick reply,
    Saw you are living in South Africa, Hope to get there sometimes, my wife has a lot of relatives living over there nere kaapstad.

    for our problem:
    C:\Program Files\Log Parser 2.2>logparser "select * from c:\faxlog\outboxlog.txt where to_int(\"Retries\")>1" -i:tsv
    Error: Header for file "c:\faxlog\OutboxLOG.txt" contains an empty field name declaration

    C:\Program Files\Log Parser 2.2>
    I receive an error when just using -i:TSV

    I have managed to read the file but needed to import the original log into Excel and then save it as a comma separated files (separated by ;) then had to make a find/replace for ; to , and after that i could read the file but even then i dont get it in the right format because some of the fields are left blank, logparfser put the last found value in the first free column,

    eg: my billingcode in recepients name for example.

    + we where trying to send faxes from out of our database, and such include our unique record ID in the field BillingCode
    So the idea is to get in certain time intervals to read out the logfile searching for those record id's in the column Billingcode.

    So our statement should match:
    Logparser "select Status from OutboxLog.txt where to_int(\"Billingcode\") = 123454321" logparser params

    This should give you 2 results with i file i provided but i find 0 results here,,

    Searching SQL wise is not a problem, in that im pretty good at it, but can't get the Logparser to work as it should.

    Hope that you can help me.
    Tnx in advance.
    Eddy

  • 10-13-2008, 4:38 AM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 7:17 AM
    • Johannesburg, South Africa
    • Posts 84

    Re: Logparser can't read MS Fax log .???

    Hi Eddy,

    When your in country, give me a shout and we'll go for a beer or two ;-) 

    Okay, I tried to solve this at home yesterday, but have noted some different behaviour between my home setup and here at work. I will try have a look again a bit later today. 

    Cheers, Dave 

    Yes, dear
  • 10-13-2008, 12:39 PM In reply to

    • yellowdog.dave
    • Top 75 Contributor
    • Joined on 07-18-2008, 7:17 AM
    • Johannesburg, South Africa
    • Posts 84

    Re: Logparser can't read MS Fax log .???

    Hi Eddy, 

    Only got to this now, sorry for that. 

    I cannot explain the difference in my home versus workplace setup, and I did see the strange behaviour with the TSV, but what I have done is to give you a statment that will automatically generate for you the file in a more manageable format that works. I created a batch file called out.bat with the following statements;

    @echo off
    Logparser "select replace_str(replace_str(text,'\"',''),'\u0009',',') from OutboxLog.txt" -q:on -i:textline

    Now when I run this I pipe the output to, my statement which can find all the Billing codes and so forth. I know this is not a fix, but a workaround, but you could play with the automation of it.

    This is an example of what I did. 

    C:\projects\logparser>out|logparser "select distinct Billingcode from STDIN" -i:csv
    BillingCode
    -----------
    <NULL>
    123454321

    Statistics:
    -----------
    Elements processed: 53
    Elements output:    2
    Execution time:     0.13 seconds

    I hope this helps.

    Cheers, Dave 

    Yes, dear
  • 10-14-2008, 1:13 AM In reply to

    • Eddy-dd
    • Not Ranked
    • Joined on 10-10-2008, 6:47 AM
    • Posts 3

    Re: Logparser can't read MS Fax log .???

    Hello Dave,
    Tnx a lot for the provided code and example,

    This just runs fine, now i have some output that i can really work with,

    Tnx again and i'll keep you on the beer deal :-)

    wkr,
    Eddy

Page 1 of 1 (6 items)
Microsoft Communities