1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WAD Issues with LOG Command

Discussion in 'Support' started by Jay Sage, Dec 29, 2015.

  1. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    After a fresh reboot, I find that the LOG command is not working properly.

    First, after I issued the command

    log /a /w c:\tcmd\cmdlog-all.log​

    the variable %_logfile is still empty.

    upload_2015-12-29_22-32-53.png

    The log file is there, and it is logging whatever appears in the tab. Here is what I now see at the end:

    upload_2015-12-29_22-34-27.png

    The help for the LOG commands states as follows:

    Command logging creates a record of each internal and external command executed either from the command prompt or from a batch file in the format below:


    [date time][id] command


    where the date and time are formatted according to the country code set for your system, id is the process ID, and command is the actual command after any alias or variable expansion.
    As can be seen from the snippet of my log file above, there is no time stamp and no process ID. When I use the "/H" option with LOG, I also do not get time stamps or IDs. And "echo %_logfile" still returns "ECHO IS OFF". So does "echo %_hlogfile". But it appears that data is being logged to both files.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    You're specifying an output log file (not a command log file), which does not set the %_logfile variable, and which does not write the date, time, or ID.

    If you want a command (or history) log, do not use the /A option.
     
  3. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    What option does one use to specify a command log? The choices seem to be /A, /E, or /H.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    Command logs are the default. You don't need to specify anything.
     
  5. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    May I suggest, then, adding that statement to the help text.

    The following statement in the help file is confusing:

    The LOG command provides independent controls for two different methods of logging TCC activity:

    ·Command Log
    ·History Log
    ·Output Log

    You can only specify one of the /A, /E, and /H options in a single LOG command.​

    It states that there are TWO different methods and then lists three. Under the "Command Log" section, it should state that that is the default if none of the three switches is specified.

    Why is there no %_ologfile to determine the name of the output log file?

    It would also be nice if the help made clear that each of the three can be specified and that one can have as many as three log files running at the same time.
     

Share This Page