diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-03 16:47:14 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-10-03 16:47:14 +0000 |
commit | beff0e1e132e8005611ed4d3f07955252a7e8d72 (patch) | |
tree | 7f1bef609120ec563d75b6f60e6c8216c8be1e4f /lib/sqlalchemy/logging.py | |
parent | 7a2194e6c0c392ea50fb8b325acb27f8a98428f9 (diff) | |
download | sqlalchemy-beff0e1e132e8005611ed4d3f07955252a7e8d72.tar.gz |
- merged loader_strategies branch into trunk.
- this is a wide refactoring to "attribute loader" and "options" architectures.
ColumnProperty and PropertyLoader define their loading behaivor via switchable
"strategies", and MapperOptions no longer use mapper/property copying
in order to function; they are instead propigated via QueryContext
and SelectionContext objects at query/instnaces time.
All of the copying of mappers and properties that was used to handle
inheritance as well as options() has been removed and the structure
of mappers and properties is much simpler and more clearly laid out.
Diffstat (limited to 'lib/sqlalchemy/logging.py')
-rw-r--r-- | lib/sqlalchemy/logging.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/logging.py b/lib/sqlalchemy/logging.py index bbd008dac..fe5c5c0e5 100644 --- a/lib/sqlalchemy/logging.py +++ b/lib/sqlalchemy/logging.py @@ -40,9 +40,10 @@ def default_logging(): handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(name)s %(message)s')) rootlogger.addHandler(handler) -def _get_instance_name(instance): +def _get_instance_name(instance): # since getLogger() does not have any way of removing logger objects from memory, - # instance logging displays the instance id as a modulus of 10 to prevent endless memory growth + # instance logging displays the instance id as a modulus of 16 to prevent endless memory growth + # also speeds performance as logger initialization is apparently slow return instance.__class__.__module__ + "." + instance.__class__.__name__ + ".0x.." + hex(id(instance))[-2:] def instance_logger(instance): |