Skip to content

Commit

Permalink
Move overrides for registrations to debug.
Browse files Browse the repository at this point in the history
These are only useful at INFO if you're worried about accidentally overwriting existing aliases... but even in that case, it's unlikely for overwriting two similar-named but differently-typed to "just work". You kind of _have_ to do it intentionally.

Reviewed at https://rbcommons.com/s/twitter/r/2023/
  • Loading branch information
stuhood authored and Stu Hood committed Apr 2, 2015
1 parent 9fab1c2 commit d1538a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/python/pants/base/build_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def register_target_alias(self, alias, target):
'given {0}'.format(target))

if alias in self._target_aliases:
logger.info('Target alias {alias} has already been registered. Overwriting!'
logger.debug('Target alias {alias} has already been registered. Overwriting!'
.format(alias=alias))
self._target_aliases[alias] = target
self.register_addressable_alias(alias, target.get_addressable_type())
Expand All @@ -82,7 +82,7 @@ def register_exposed_object(self, alias, obj):
'via `register_target_alias`'.format(obj))

if alias in self._exposed_objects:
logger.info('Object alias {alias} has already been registered. Overwriting!'
logger.debug('Object alias {alias} has already been registered. Overwriting!'
.format(alias=alias))
self._exposed_objects[alias] = obj

Expand All @@ -99,7 +99,7 @@ def register_addressable_alias(self, alias, addressable_type):
of the type of instance it yields.
"""
if alias in self._addressable_alias_map:
logger.info('Addressable alias {alias} has already been registered. Overwriting!'
logger.debug('Addressable alias {alias} has already been registered. Overwriting!'
.format(alias=alias))
self._addressable_alias_map[alias] = addressable_type

Expand All @@ -115,7 +115,7 @@ def register_exposed_context_aware_object_factory(self, alias, context_aware_obj
.format(factory=context_aware_object_factory))

if alias in self._exposed_context_aware_object_factories:
logger.info('This context aware object factory alias {alias} has already been registered. '
logger.debug('This context aware object factory alias {alias} has already been registered. '
'Overwriting!'.format(alias=alias))

if callable(context_aware_object_factory):
Expand Down

0 comments on commit d1538a1

Please sign in to comment.