IBM ILOG Scheduler User's Manual > Getting Started with Scheduler > Using the Trace Facilities > Define the Problem, Design a Model > Creating a Trace Object

To get all the information about the modifications of traced activities, we create an instance of the class IlcSchedulerPrintTrace at the beginning of the search. We build a goal like this:

ILCGOAL1(SetTraceIlc, IlcInt, traceLevel) {
  IloSolver solver = getSolver();
  IlcScheduler scheduler(solver);
  IlcSchedulerPrintTrace trace(scheduler);
  solver.setTraceMode(IlcTrue);

We first create a trace object that is used to specify which objects must be traced, then instruct Solver to turn on its trace mode (otherwise the trace object would do nothing).