mirror of
https://github.com/openkmip/pykmip
synced 2025-12-15 07:43:26 +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:
@@ -23,12 +23,13 @@ from kmip.demos import utils
|
||||
from kmip.services.kmip_client import KMIPProxy
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
logger = utils.build_console_logger(logging.INFO)
|
||||
|
||||
# Build and parse arguments
|
||||
parser = utils.build_cli_parser(Operation.DISCOVER_VERSIONS)
|
||||
opts, args = parser.parse_args(sys.argv[1:])
|
||||
@@ -44,12 +45,6 @@ if __name__ == '__main__':
|
||||
protocol_versions.append(ProtocolVersion.create(int(mm[0]),
|
||||
int(mm[1])))
|
||||
|
||||
# Build and setup logging
|
||||
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 the client and connect to the server
|
||||
client = KMIPProxy(config=config)
|
||||
client.open()
|
||||
|
||||
Reference in New Issue
Block a user