Creating a Log

Executing the example requires that the repository contains a database with the BD identifier.

Sub Main;

Var

MB: IMetabase;

CrInfo: IMetabaseObjectCreateInfo;

Log: ILog;

Begin

MB := MetabaseClass.Active;

CrInfo := MB.CreateCreateInfo;

CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_LOG;

CrInfo.Id := "NewLog";

CrInfo. Name: = "New log";

CrInfo.Parent := MB.Root;

Log := MB.CreateObject(CrInfo).Edit As ILog;

Log.Database := Mb.ItemById("BD").Bind As IDatabase;

Log.NativeName := "NewLog";

(Log As IMetabaseObject).Save;

End Sub Main;

After executing the example, a new log is created in repository root. In future the log could be used for storage of the information reports, used at calculation of ETL problem.

See also:

Examples