++ more host prefixing log code
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								a415cc4b91
							
						
					
				
			
			
				commit
				
					
						00a1f1eeb9
					
				
			
		
					 2 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
					@ -70,8 +70,8 @@ class ConfigInstall(object):
 | 
				
			||||||
        start_time = time.time()
 | 
					        start_time = time.time()
 | 
				
			||||||
        self.deploy_to()
 | 
					        self.deploy_to()
 | 
				
			||||||
        self.cleanup()
 | 
					        self.cleanup()
 | 
				
			||||||
        self.log.info("Finished run of %s in %s seconds", 
 | 
					        self.log.info("Finished run in %s seconds", 
 | 
				
			||||||
            self.context.target_host, time.time() - start_time)
 | 
					            time.time() - start_time)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def stage_prepare(self):
 | 
					    def stage_prepare(self):
 | 
				
			||||||
        """Do everything for a deploy, minus the actual code stage"""
 | 
					        """Do everything for a deploy, minus the actual code stage"""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,9 +25,6 @@ import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cdist
 | 
					import cdist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
log = logging.getLogger(__name__)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
'''
 | 
					'''
 | 
				
			||||||
common:
 | 
					common:
 | 
				
			||||||
    runs only remotely, needs local and remote to construct paths
 | 
					    runs only remotely, needs local and remote to construct paths
 | 
				
			||||||
| 
						 | 
					@ -67,13 +64,16 @@ class Explorer(object):
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    def __init__(self, target_host, local, remote):
 | 
					    def __init__(self, target_host, local, remote):
 | 
				
			||||||
        self.target_host = target_host
 | 
					        self.target_host = target_host
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        self.log = logging.getLogger(target_host)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.local = local
 | 
					        self.local = local
 | 
				
			||||||
        self.remote = remote
 | 
					        self.remote = remote
 | 
				
			||||||
        self.env = {
 | 
					        self.env = {
 | 
				
			||||||
            '__target_host': self.target_host,
 | 
					            '__target_host': self.target_host,
 | 
				
			||||||
            '__explorer': self.remote.global_explorer_path,
 | 
					            '__explorer': self.remote.global_explorer_path,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if log.getEffectiveLevel() == logging.DEBUG:
 | 
					        if self.log.getEffectiveLevel() == logging.DEBUG:
 | 
				
			||||||
            self.env.update({'__debug': "yes" })
 | 
					            self.env.update({'__debug': "yes" })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ### global
 | 
					    ### global
 | 
				
			||||||
| 
						 | 
					@ -106,7 +106,7 @@ class Explorer(object):
 | 
				
			||||||
        """Transfer the type explorers for the given type to the remote side."""
 | 
					        """Transfer the type explorers for the given type to the remote side."""
 | 
				
			||||||
        if cdist_type.explorers:
 | 
					        if cdist_type.explorers:
 | 
				
			||||||
            if cdist_type.explorers_transferred:
 | 
					            if cdist_type.explorers_transferred:
 | 
				
			||||||
                log.debug("Skipping retransfer of type explorers for: %s", cdist_type)
 | 
					                self.log.debug("Skipping retransfer of type explorers for: %s", cdist_type)
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                source = os.path.join(self.local.type_path, cdist_type.explorer_path)
 | 
					                source = os.path.join(self.local.type_path, cdist_type.explorer_path)
 | 
				
			||||||
                destination = os.path.join(self.remote.type_path, cdist_type.explorer_path)
 | 
					                destination = os.path.join(self.remote.type_path, cdist_type.explorer_path)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue