@CalcMgrLog
Purpose:
Logs diagnostics from a calculation script. If the file name is empty, the messages are written to the console
Syntax:
Java Class: com.hyperion.calcmgr.common.cdf.StringFunctions.log(String,String,String[],double[],boolean)
CDF Spec: CalcMgrLog(fileName,msg,strings,values,printDate)
Example 1:
FIX ("Sales",@Children("100"),"Florida")
"Budget" (
@CalcMgrLog("c:/temp/cal.log", "Log: ",
@LIST(@NAME(@CURRMBR("Year")),
@NAME(@CURRMBR("Measures")),
@NAME(@CURRMBR("Product")),
@NAME(@CURRMBR("Market")),
@NAME(@CURRMBR("Scenario"))
),
@LIST(@CURRMBR("Year"),
@CURRMBR("Measures"),
@CURRMBR("Product"),
@CURRMBR("Market"),
@CURRMBR("Scenario")
),
@_True
);
)
ENDFIX
The log file entry might look like this:
In this example, the log file entry might look like this:
2014-12-20 15:38:13 Log: Apr Sales 100-10 Florida Budget 210.0 210.0 210.0 210.0 210.0
Example 2:
FIX ("Sales",@Children("100"),"Florida")
"Budget" (
@CalcMgrLog(
"c:/temp/cal.log",
"Log: ",
@LIST(
@CalcMgrStringsToString(
@LIST( @NAME( @CURRMBR( "Year")), @NAME( @CURRMBR( "Measures")), @NAME( @CURRMBR( "Product")), @NAME( @CURRMBR( "Market")), @NAME( @CURRMBR( "Scenario"))),
","),
@CalcMgrFormatDouble( "%7.2f", @CURRMBR( "Year")->@CURRMBR( "Measures")->@CURRMBR( "Product")->@CURRMBR( "Market")->@CURRMBR( "Scenario"))
),
@LIST( 0.0), @_True);
)
ENDFIX
In this example, the log file entry might look like this:
2014-12-20 15:40:10 Log: Apr,Sales,100-10,Floridshoula,Budget 210.00 0.0