ILog.DropLog

Syntax

DropLog;

Description

The DropLog method removes log from database.

Example

Sub Main;

Var

Des: IMetabaseObjectDescriptor;

CrInf: IMetabaseObjectCreateInfo;

Mb: IMetabase;

MbObj: 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);

MbObj := Des.Edit;

Log := MbObj.GetExtensionDispatch As ILog;

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

Log.NativeName := "NewLog";

MbObj.Save;

Log.DropLog;

Log.CreateLog;

End Sub Main;

After executing the example, a new log is created in database and in repository, later this log will be removed from a database and created again by metadata available in the Log variable.

See also:

ILog