[Notes] [Git][BuildStream/buildstream][Qinusty/message-helpers] fixup! Overhaul internal messaging API



Title: GitLab

Tristan Maat pushed to branch Qinusty/message-helpers at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_context.py
    ... ... @@ -351,6 +351,11 @@ class Context():
    351 351
         #    message: A Message object
    
    352 352
         #
    
    353 353
         def _send_message(self, message):
    
    354
    +        # Debug messages should only be displayed when they are
    
    355
    +        # configured to be
    
    356
    +        if not self.log_debug and message.message_type == MessageType.DEBUG:
    
    357
    +            return
    
    358
    +
    
    354 359
             # Tag message only once
    
    355 360
             if message.depth is None:
    
    356 361
                 message.depth = len(list(self._message_depth))
    
    ... ... @@ -408,8 +413,7 @@ class Context():
    408 413
         # Produce and send a debug message through the context.
    
    409 414
         #
    
    410 415
         def debug(self, text, **kwargs):
    
    411
    -        if self.log_debug:
    
    412
    -            self.message(text, msg_type=MessageType.DEBUG, **kwargs)
    
    416
    +        self.message(text, msg_type=MessageType.DEBUG, **kwargs)
    
    413 417
     
    
    414 418
         # status():
    
    415 419
         #
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]