Show contents 

Db > Db Assembly Interfaces > ILog > ILog.DropLog

ILog.DropLog

Syntax

DropLog;

Description

The DropLog method removes log from database.

Example

Sub UserProc;
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 UserProc;

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