Пример #1
0
      //-----------------------------------------------------------------------
      virtual void log(
                       const Subsystem &inSubsystem,
                       Log::Severity inSeverity,
                       Log::Level inLevel,
                       CSTR inMessage,
                       CSTR inFunction,
                       CSTR inFilePath,
                       ULONG inLineNumber
                       )
      {
        IClientLogDelegatePtr delegate;

        // scope: get the delegate
        {
          AutoRecursiveLock lock(mLock);
          delegate = mDelegate;
        }
        if (!delegate)
          return;

        delegate->onLog(
                        (PTRNUMBER)(&inSubsystem),
                        inSubsystem.getName(),
                        severityToSeverity(inSeverity),
                        levelToLevel(inLevel),
                        inMessage,
                        inFunction,
                        inFilePath,
                        inLineNumber
                        );
      }
Пример #2
0
      //-----------------------------------------------------------------------
      virtual void onNewSubsystem(Subsystem &inSubsystem)
      {
        IClientLogDelegatePtr delegate;

        // scope: get the delegate
        {
          AutoRecursiveLock lock(mLock);
          mSubsystems[(PTRNUMBER)(&inSubsystem)] = &inSubsystem;
          delegate = mDelegate;
        }

        if (!delegate)
          return;

        delegate->onNewSubsystem((PTRNUMBER)(&inSubsystem), inSubsystem.getName());
      }