« Previous Next »

Thread: Invalid parameter

Last post 09-07-2006 9:32 PM by LogParser User : Vijai Kalyan. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 09-06-2006, 8:30 AM

    Invalid parameter

    Hi Everyone,

    I wrote an input format plugin. Since I couldn't get my custom properties to be set, I created additional command line options. If I use the additional command line options with the -h option, they work correctly. However, when using the additional command line options with a query, I get an error

    Error: invalid parameter "iCfgFile=D"

    For example:

    Here is the working version:-

    [c:\devtools\logparser]LogParser.exe -h -i:COM -iProgID:com.bentley.pwise.log4cxx.Log4cxxInputFormat -iCfgFile="D:\ProjectWiseTrunk\Build\delivery\Program Files\Bentley\ProjectWise\bin\mcm.l
    og.xml" -iAppenderName=FileAppender

    Input format: COM (Custom COM Input Format)
    Input format COM plugins

    FROM syntax:

     <any>
     Any from-entity supported by the specified COM plugin

    Parameters:

     -iProgID    <progid>               : Version-independent Prog ID of the COM
                                          plugin to instantiate [default
                                          value=not specified]
     -iCOMParams <name>=<value> [, ...] : <name>=<value> pairs of parameters for
                                          the COM plugin [default value=not
                                          specified]
     -iCOMServer <server name>          : Name of the remote server where the COM
                                          plugin is to be instantiated [default
                                          value=local machine]

    Fields:

    [Log4cxxInputFormat] Checking command line arguments for -iCfgFile and -iAppenderName parameters.
    [Log4cxxInputFormat] Retrieved 6 command line args.
    [Log4cxxInputFormat] Found -iCfgFile cl option as: -iCfgFile=D:\ProjectWiseTrunk\Build\delivery\Program Files\Bentley\ProjectWise\bin\mcm.log.xml
    [Log4cxxInputFormat] Found -iAppenderName cl option as: -iAppenderName=FileAppender
    [Log4cxxInputFormat] Using XML Config File as: D:\ProjectWiseTrunk\Build\delivery\Program Files\Bentley\ProjectWise\bin\mcm.log.xml
    [Log4cxxInputFormat] Using appender as: FileAppender
    [Log4cxxInputFormat] Using message pattern as:
    [Log4cxxInputFormat] No input source provided. Skipping log file parse.
      ThreadID (S)       PlainText (S)      Priority (S)       PlainText2 (S)
      Category (S)       PlainText3 (S)     TimeStamp (S)      PlainText4 (S)
      TimeStamp2 (S)     PlainText5 (S)     TimeStamp3 (S)     PlainText6 (S)
      TimeStamp4 (S)     PlainText7 (S)     Message (S)

    Examples:

     Create a CSV file with information from a custom COM plugin:

         LogParser "SELECT * INTO Report.csv FROM MyFromEntity" -i:COM
         -iProgID:MyCompany.MyComPlugin -iCOMParams:TargetMachine=localhost,Exten
         dedFields=on

    However, here is the non-working version:-

    [c:\devtools\logparser]LogParser.exe -i:COM -o:NAT "SELECT * FROM mcm.log" -iProgID:com.bentley.pwise.log4cxx.Log4cxxInputFormat -iCfgFile="D:\ProjectWiseTrunk\Build\delivery\Program Files\B
    entley\ProjectWise\bin\mcm.log.xml" -iAppenderName=FileAppender

    I am not sure why it works in one situation and not another. Any pointers?

    thanks for any help,

    -vijai.


    Error: invalid parameter "iCfgFile=D"

  • 09-06-2006, 5:27 PM In reply to

    Yeah, the fact that it works with -h is because when in -h mode, LP passes everything it doesn't recognize as an argument on to the input format.
    In the built in input formats, they expect the argument to be the name of a file that they parse to display the column names.
    I mention that in this thread

    That mechanism doesn't happen when you are actually executing a query though which is why you get the invalid parameter.

    You've got to figure out what is wrong with your custom properties COM code. :/ I remember I had a lot of trouble with it in C# and finally figured out how to do it (post is here). Doubt your answer will be the same as mine though. :/ Did you scour the Repository to see if the other C++ input format uses COMParams?
  • 09-07-2006, 9:32 PM In reply to

    Hi Daniel,

    Thanks for the help. I looked around on the forums and resources pages and found an explanation of how the custom properties structure behaves. I fixed that and things work now!

    Thanks a lot for pointing me along.

    regards,

    -vijai.

Page 1 of 1 (3 items)
Microsoft Communities