Database: IDatabase;
The Database property determines a database where the log is stored.
Sub Main;
Var
Des: IMetabaseObjectDescriptor;
CrInf: IMetabaseObjectCreateInfo;
Mb: IMetabase;
MObj: IMetabaseObject;
Log: ILog;
Begin
Mb:=MetabaseClass.Active;
CrInf := Mb.CreateCreateInfo;
CrInf.ClassId := MetabaseObjectClass.KE_CLASS_LOG;
CrInf.Id := "NewLog";
CrInf.Name := "NewLog";
CrInf.Parent := Mb.Root;
Des := Mb.CreateObject(CrInf);
MObj:=Des.Edit;
Log:=MObj As ILog;
Log.Database:=Mb.ItemById("BD").Bind As IDatabase;
Log.NativeName:="NewLog";
MObj.Save;
End Sub Main;
After executing the example, the log is created in a database with the BD identifier. The log identifier is NewLog, a physical name of log is NewLog.
See also: