Archived

This forum has been archived. Please start a new discussion on GitHub.

Another Logger usage question

As a followup to my previous queston, what is the difference between these two methods of logging?
   if(_traceLevel > 0)
   {
      Ice::Trace trace("FooI", _logger);
      trace << "dosomething";
   }
and
   if(_traceLevel > 0)
   {
      _logger->trace("FooI", "dosomething");
   }

Thanks,

Comments

  • They do exactly the same thing. Both print something like:

    [ 07/25/07 11:11:44.312 FooI: dosomething ]

    operator<< is provided simply as a convenience function.

    Cheers,

    Michi.
  • Thanks Michi,