Changeset 917


Ignore:
Timestamp:
12/05/06 13:52:51 (13 years ago)
Author:
pjkersha
Message:

Working prototype log server. Has no message level security implemented yet.

Location:
TI12-security/trunk/python
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/NDG/Log.py

    r915 r917  
    1919 
    2020 
     21#_____________________________________________________________________________ 
     22class LogError(Exception): 
     23    """Exception handling for NDG Logging class.""" 
     24     
     25    def __init__(self, msg): 
     26        self.__msg = msg 
     27          
     28    def __str__(self): 
     29        return self.__msg 
     30 
     31 
     32#_____________________________________________________________________________ 
    2133class Log(_logSuperClass): 
    2234    """NDG Logging class""" 
    2335     
    24     __msgFmt = '%(asctime)s %(name)s %(module)s: %(levelname)-8s %(message)s' 
     36    __msgFmt = '%(asctime)s %(name)s: %(levelname)-8s %(message)s' 
    2537    __dateFmt = '%d %b %Y %H:%M:%S' 
    2638     
    27     def __init__(self, logName='NDG', logFilePath=None, console=False): 
     39    def __init__(self, logName='', logFilePath=None, console=False): 
    2840        """NDG Logging class 
    2941         
     
    6678             
    6779            self.addHandler(fileLog) 
    68          
    69  
    70     def test(self): 
    71          
    72         # Now, we can log to the root logger, or any other logger. First the root... 
    73         try: 
    74             self.info('Jackdaws love my big sphinx of quartz.') 
    75          
    76             self.debug('Quick zephyrs blow, vexing daft Jim.') 
    77             self.info('How quickly daft jumping zebras vex.') 
    78             self.warning('Jail zesty vixen who grabbed pay from quack.') 
    79             self.error('The five boxing wizards jump quickly.') 
    80              
    81         except Exception, e: 
    82             raise Exception("Error writing to log: %s" + str(e)) 
    83  
    84  
    85 if __name__ == "__main__": 
    86     log = Log(logFilePath="./ndg.log", console=True) 
    87     log.test()        
  • TI12-security/trunk/python/bin/AttAuthorityServer.py

    r690 r917  
    3737 
    3838#_____________________________________________________________________________ 
    39 class SessionMgrSOAPRequestHandler(SOAPRequestHandler): 
     39class attAuthoritySOAPRequestHandler(SOAPRequestHandler): 
    4040     """Add a do_GET method to return the WSDL on HTTP GET requests. 
    4141     Please note that the path to the wsdl file is derived from what 
     
    145145         AsServer(port=port,  
    146146                  services=[attAuthority(aa, debug=debug)],  
    147                   RequestHandlerClass=SessionMgrSOAPRequestHandler) 
     147                  RequestHandlerClass=attAuthoritySOAPRequestHandler) 
    148148 
    149149    except KeyboardInterrupt: 
Note: See TracChangeset for help on using the changeset viewer.