Coverage for src/bin/cfgmgr/plugins/b10logging : 97%
        
        
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
| 
 # Copyright (C) 2011 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM # DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL # INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
 # This is the configuration plugin for logging options # The name is 'b10logging' because logging.py is an existing module # # For a technical background, see # http://bind10.isc.org/wiki/LoggingCppApiDesign # 
 
 'debug', 'info', 'warn', 'error', 'fatal', 'none' ] 'file', 'syslog' ] 'stderr' ] 
 # Check the data layout first # The 'layout' is ok, now check for specific values # name should always be present # report an error if name starts with * but not *., # or if * is not the first character. # TODO: we might want to also warn or error if the # logger name is not an existing module, but we can't # really tell that from here at this point name == '*.' or\ (star_pos == 0 and len(name) > 1 and name[1] != '.'): "only be used instead of the full " "first-level name, e.g. '*' or " "'*.subsystem'") 
 logger['severity'].lower() not in ALLOWED_SEVERITIES: ": " + logger['severity']) name + ": " + output_option['destination']) else: # if left to default, output is stdout, and # it will not show in the updated config, # so 1. we only need to check it if present, # and 2. if destination is changed, so should # output. So first check checks 'in', and the # others 'not in' for 'output' 'output' in output_option and\ output_option['output'] not in ALLOWED_STREAMS: ": " + output_option['output'] + ", must be stdout or stderr") ('output' not in output_option or\ output_option['output'] == ""): "output not set to any " "filename for logger " + name) 'output' not in output_option or\ output_option['output'] == "": "output not set to any facility" " for logger " + name) 
 
 
  |