2009-08-20 22:57:24 +00:00
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
Contributors can be viewed at:
|
|
|
|
|
http://svn.secondlife.com/svn/linden/projects/2008/pyogp/lib/base/trunk/CONTRIBUTORS.txt
|
|
|
|
|
|
|
|
|
|
$LicenseInfo:firstyear=2008&license=apachev2$
|
|
|
|
|
|
|
|
|
|
Copyright 2009, Linden Research, Inc.
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0.
|
|
|
|
|
You may obtain a copy of the License at:
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
or in
|
|
|
|
|
http://svn.secondlife.com/svn/linden/projects/2008/pyogp/lib/base/LICENSE.txt
|
|
|
|
|
|
|
|
|
|
$/LicenseInfo$
|
|
|
|
|
"""
|
|
|
|
|
|
2008-10-18 14:15:51 +00:00
|
|
|
class Settings(object):
|
2009-01-29 06:58:03 +00:00
|
|
|
|
2009-03-13 22:09:43 +00:00
|
|
|
def __init__(self, quiet_logging = False):
|
2009-03-03 01:40:52 +00:00
|
|
|
""" some lovely configurable settings
|
|
|
|
|
|
|
|
|
|
These are applied application wide, and can be
|
|
|
|
|
overridden at any time in a specific instance
|
|
|
|
|
"""
|
|
|
|
|
|
2009-03-13 22:09:43 +00:00
|
|
|
self.quiet_logging = quiet_logging
|
|
|
|
|
|
2009-03-03 01:40:52 +00:00
|
|
|
# toggle handling udp packets
|
|
|
|
|
self.HANDLE_PACKETS = True
|
|
|
|
|
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~
|
2009-02-06 00:29:40 +00:00
|
|
|
# Logging behaviors
|
2009-03-03 01:40:52 +00:00
|
|
|
#~~~~~~~~~~~~~~~~~~
|
|
|
|
|
# being a test tool, and an immature one at that,
|
|
|
|
|
# enable fine granularity in the logging, but
|
|
|
|
|
# make sure we can tone it down as well
|
|
|
|
|
|
|
|
|
|
self.LOG_VERBOSE = True
|
2009-09-03 19:34:54 +00:00
|
|
|
self.ENABLE_BYTES_TO_HEX_LOGGING = True
|
2009-03-12 20:48:26 +00:00
|
|
|
self.ENABLE_CAPS_LOGGING = True
|
2009-09-03 19:34:54 +00:00
|
|
|
self.ENABLE_CAPS_LLSD_LOGGING = True
|
2009-03-05 21:50:23 +00:00
|
|
|
self.ENABLE_EQ_LOGGING = True
|
|
|
|
|
self.ENABLE_UDP_LOGGING = True
|
2009-03-18 21:32:21 +00:00
|
|
|
self.ENABLE_OBJECT_LOGGING = True
|
2009-03-26 20:10:13 +00:00
|
|
|
self.LOG_SKIPPED_PACKETS = True
|
2009-04-01 23:49:16 +00:00
|
|
|
self.ENABLE_HOST_LOGGING = True
|
|
|
|
|
self.LOG_COROUTINE_SPAWNS = True
|
2009-03-03 01:40:52 +00:00
|
|
|
|
|
|
|
|
# allow disabling logging of certain packets
|
2009-03-12 20:48:26 +00:00
|
|
|
self.DISABLE_SPAMMERS = True
|
2009-03-03 01:40:52 +00:00
|
|
|
self.UDP_SPAMMERS = ['PacketAck', 'AgentUpdate']
|
|
|
|
|
|
2009-03-13 22:09:43 +00:00
|
|
|
# override the defaults
|
|
|
|
|
if self.quiet_logging:
|
|
|
|
|
self.LOG_VERBOSE = False
|
|
|
|
|
self.ENABLE_BYTES_TO_HEX_LOGGING = False
|
|
|
|
|
self.ENABLE_CAPS_LOGGING = False
|
|
|
|
|
self.ENABLE_CAPS_LLSD_LOGGING = False
|
|
|
|
|
self.ENABLE_EQ_LOGGING = False
|
2009-03-26 20:10:13 +00:00
|
|
|
self.ENABLE_UDP_LOGGING = False
|
|
|
|
|
self.LOG_SKIPPED_PACKETS = False
|
|
|
|
|
self.ENABLE_OBJECT_LOGGING = False
|
2009-03-31 15:20:26 +00:00
|
|
|
self.ENABLE_HOST_LOGGING = False
|
2009-04-01 23:49:16 +00:00
|
|
|
self.LOG_COROUTINE_SPAWNS = False
|
2009-03-13 22:09:43 +00:00
|
|
|
|
2009-03-03 01:40:52 +00:00
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
# Test related settings
|
|
|
|
|
#~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
2009-04-27 22:48:01 +00:00
|
|
|
self.ENABLE_LOGGING_IN_TESTS = True
|
2009-02-05 23:26:52 +00:00
|
|
|
|
2009-04-27 22:48:01 +00:00
|
|
|
|
|
|
|
|
|