Skip to content

Version 1.8.0

Choose a tag to compare

@softvar softvar released this 22 Apr 07:33
· 31 commits to master since this release

[1.8.0] - 2025-04-22

Added

  • Added support to add single transport or multiple transport using key transports. The transport parameter allows you to implement custom logging behavior by providing your own logging functions.

    from vwo import init
    
    class CustomTransport:
      def __init__(self, config):
          self.level = config.get('level', "ERROR")
          self.config = config
    
      def log(self, level, message):
          # your custom implementation here
    
    options = {
        'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
        'account_id': '123456', # VWO Account ID
        'logger' {
          'transport': CustomTransport({'level': 'INFO'})
        }
    }
    
    vwo_client = init(options)
  • For multiple transports you can use the transports parameter. For example:

    from vwo import init
    
    class CustomTransportForInfo:
        def __init__(self, config):
            self.level = config.get('level', "INFO")
            self.config = config
    
        def log(self, level, message):
            # your custom implementation here
    
    class CustomTransportForError:
        def __init__(self, config):
            self.level = config.get('level', "ERROR")
            self.config = config
    
        def log(self, level, message):
            # your custom implementation here
    
    options = {
        'sdk_key': '32-alpha-numeric-sdk-key', # SDK Key
        'account_id': '123456', # VWO Account ID
        'logger' {
            'transports': [
                CustomTransportForInfo({'level': 'INFO'}),
                CustomTransportForError({'level': 'ERROR'})
            ]
        }
    }
    
    vwo_client = init(options)