> Programming Considerations > Managing Input and Output > Managing Log Files |
Managing Log Files |
INDEX PREVIOUS NEXT |
As ILOG CPLEX is working, it can record messages to a log file. By default, the Interactive Optimizer creates the log file in the directory where it is running, and it names the file cplex.log
. If such a file already exists, ILOG CPLEX adds a line indicating the current time and date and then appends new information to the end of the existing file. That is, it does not overwrite the file, and it distinguishes different sessions within the log file. By default, there is no log file for Component Library applications.
You can locate the log file where you like, and you can rename it. Some users, for example, like to create a specifically named log file for each session. Also you can close the log file in case you do not want ILOG CPLEX to record messages to its default log file.
The following sections show you the commands for creating, renaming, relocating, and closing a log file.
set logfile filename
, substituting the name you prefer for the log file. In other words, use this command to rename or relocate the default log file.
CPXfopen
to open the target file; then use the routine CPXsetlogfile
. The ILOG CPLEX Reference Manual documents both routines.
setOut
method to send logging output to the specified output stream.
set logfile *
.
CPXsetlogfile
, call CPXsetlogfile
again, and this time, pass a NULL
pointer as its second argument.
setOut
method with env.getNullStream
as argument, where env
is an IloEnv
object, to stop sending logging output to an output stream.
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |