#86 Log file instead of console output

open
nobody
None
5
2005-02-15
2005-02-15
Alex Smith
No

This patch allows the user to send the PearPC output to
a log file, rather than the command line. It modifies
tools/snprintf.cc, tools/snprintf.h and main.cc. The main
part is in snprintf.cc, which has a new function to
initialize the log file, and some changes to existing
functions to be able to output to log file.

The changes in main.cc allow for new config file entries.
These specify whether to output to command line or log
file, name of the log file, and mode of the log file
(append or erase).

To use, apply the patch and compile, then add these
lines to your config file:

ppc_logfile_enabled = 1 (set to 0 for command line)
ppc_logfile_location = "ppc.log" (change location of log)
ppc_logfile_mode = "a" (a for append, e for erase)

Discussion

  • Alex Smith
    Alex Smith
    2005-02-16

    Logged In: YES
    user_id=1151901

    Some modifications which fix a output leak and allow you to
    set the mode to "n" which completely disables output
    altogether.

     
  • Alex Smith
    Alex Smith
    2005-02-16

    Updated log patch

     
    Attachments
  • Alex Smith
    Alex Smith
    2005-02-17

    Logged In: YES
    user_id=1151901

    I have just uploaded an experimental utility that allows
    PearPC to run without a command prompt. It needs to be in
    the same directory as PearPC and your config. The config has
    to be named ppc.cfg. It needs the Visual Basic 6 runtime.
    This is pretty buggy, and for some reason, does not close
    when PearPC exits, instead it stops responding. Just double
    click to run.

    Remember it is experimental (and it is something I hacked
    together in about 2 minutes!)

     
  • Alex Smith
    Alex Smith
    2005-02-17

    PearPC Command Line Remover

     
    Attachments
  • Alex Smith
    Alex Smith
    2005-02-18

    PearPC Command Line Remover Source code

     
    Attachments
  • Alex Smith
    Alex Smith
    2005-02-18

    Logged In: YES
    user_id=1151901

    I have uploaded the source code for the command line
    remover