Ticket #1140: patch.diff

File patch.diff, 747 bytes (added by https://www.google.com/accounts/o8/id?id=AItOawlPKYcLUHnVh6m82dkD_mNpQLOwSI_RzeQ, 9 years ago)

Patch that fixes problem symptoms

  • src/lib/Bcfg2/Logger.py

    diff --git a/src/lib/Bcfg2/Logger.py b/src/lib/Bcfg2/Logger.py
    index c2eac1e..2c2e148 100644
    a b class FragmentingSysLogHandler(logging.handlers.SysLogHandler): 
    105105                (self.encodePriority(self.facility, newrec.levelname.lower()), 
    106106                 self.format(newrec)) 
    107107            try: 
    108                 self.socket.send(msg.encode('ascii')) 
     108                try: 
     109                    encoded = msg.encode('utf_8') 
     110                except UnicodeDecodeError: 
     111                    encoded = msg 
     112                self.socket.send(encoded) 
    109113            except socket.error: 
    110114                for i in range(10):  # pylint: disable=W0612 
    111115                    try: