mirror of
https://github.com/openkmip/pykmip
synced 2025-12-17 16:53:48 +00:00
Removing default log configuration and usage
This change removes the use of default logging settings in kmip.__init__.py as well as the bundled logconfig.ini file. Logging settings should be set by applications, not by underlying software libraries. All demos have been updated to set their own logging settings and to log at appropriate levels.
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
from six.moves import xrange
|
||||
@@ -31,6 +30,8 @@ from kmip.services.kmip_client import KMIPProxy
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
logger = utils.build_console_logger(logging.INFO)
|
||||
|
||||
# Build and parse arguments
|
||||
parser = utils.build_cli_parser(Operation.QUERY)
|
||||
opts, args = parser.parse_args(sys.argv[1:])
|
||||
@@ -39,12 +40,6 @@ if __name__ == '__main__':
|
||||
password = opts.password
|
||||
config = opts.config
|
||||
|
||||
# Build and setup logging and needed factories
|
||||
f_log = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
|
||||
'logconfig.ini')
|
||||
logging.config.fileConfig(f_log)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Build query function list.
|
||||
query_functions = list()
|
||||
query_functions.append(
|
||||
|
||||
Reference in New Issue
Block a user