How to Turn Cube Logging On & Off: TM1 CubeSetLogChanges

Ever wanted to disable logging while running a TI process? Well here is a simple function, CubeSetLogChanges, to insert into the TI to turn transaction logging off and then turn it back on after the process has run.

When we run a Turbo Integrator process in TM1, the Transaction Log will normally have a record written for each data change. To speed up the TI, we can turn off transaction logging for a TI using the command CubeSetLogChanges to set the logging properties for a specific cube. It can only be used in a TI process.

Syntax of CubeSetLogChanges

The syntax is:

CubeSetLogChanges ( CubeName , LogChanges ); 


  • CubeName is the name of the cube that you want to set the logging for, and
  • LogChanges is either 0 or 1, where 0 is sets logging off and 1 sets logging on.


A quick example of CubeSetLogChanges is:


CubeName = 'Gross Profit';CubeSetLogChanges ( CubeName, 0 );

where this turns off the transaction log for the Gross Profit cube while the TI runs.


CubeName = 'Gross Profit';CubeSetLogChanges ( CubeName, 1 );

where using the “1” at the end of this turns back on the transaction log for the Gross Profit cube after running the TI.

Example of CubeSetLogChanges when Updating Attributes

Using the syntax from above, we can use this same method using CubeSetLogChanges to turn off logging when we update attributes. This can be a good idea when there are a large number of primary elements and you then have rules that run using the attribute values.

DimName = 'z GL Account-PC';
CubeName = '}ElementAttributes_}' | DimName;
CubeSetLogChanges ( CubeName,  );

You might also like