Changeset 404


Ignore:
Timestamp:
May 22, 2016, 2:31:05 PM (9 years ago)
Author:
RBRi
Message:

another update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Library/DebugUnit.pas

    r393 r404  
    2929                        LogViewStub,
    3030                        LogObjConstDest,
     31                        LogMem,
    3132                        LogDebug
    3233    );
    3334    LogAspects = SET OF LogAspect;
    3435
     36  Function IsLogAspectsEnabled(const aLogAspect: LogAspect) : boolean;
    3537  Procedure LogEvent(const aLogAspect: LogAspect; const anEventDescription: String);
    3638
     
    144146      LogViewStub     : result := 'ViewStub';
    145147      LogObjConstDest : result := 'ObjConstDest';
     148      LogMem          : result := 'Mem';
    146149      LogDebug        : result := 'Debug';
    147150      else              result := 'Unknown';
     
    170173      if tmpAspects[i] = 'LogViewStub'     then activeLogAspects := activeLogAspects + [ LogViewStub ];
    171174      if tmpAspects[i] = 'LogObjConstDest' then activeLogAspects := activeLogAspects + [ LogObjConstDest ];
     175      if tmpAspects[i] = 'LogMem'          then activeLogAspects := activeLogAspects + [ LogMem ];
    172176      if tmpAspects[i] = 'LogDebug'        then activeLogAspects := activeLogAspects + [ LogDebug ];
    173177    end;
     
    177181
    178182
     183  Function IsLogAspectsEnabled(const aLogAspect: LogAspect) : boolean;
     184  Begin
     185    result := aLogAspect IN activeLogAspects;
     186  End;
     187
     188
    179189  Procedure LogEvent(const aLogAspect: LogAspect; const anEventDescription: String);
    180190  Var
    181191    tmpMessage : String;
    182192  Begin
    183     if (aLogAspect IN activeLogAspects) then
     193    if IsLogAspectsEnabled(aLogAspect) then
    184194    begin
    185195      tmpMessage := 'Log[' + GetAspectPrefix(aLogAspect) + ']  ' + anEventDescription;
Note: See TracChangeset for help on using the changeset viewer.