besapi 3.4.1__tar.gz → 3.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: besapi
3
- Version: 3.4.1
3
+ Version: 3.4.2
4
4
  Summary: Library for working with the BigFix REST API
5
5
  Home-page: https://github.com/jgstew/besapi
6
6
  Author: Matt Hansen, James Stewart
@@ -29,7 +29,7 @@ import requests
29
29
  from lxml import etree, objectify
30
30
  from pkg_resources import resource_filename
31
31
 
32
- __version__ = "3.4.1"
32
+ __version__ = "3.4.2"
33
33
 
34
34
  besapi_logger = logging.getLogger("besapi")
35
35
 
@@ -11,6 +11,7 @@ import sys
11
11
  import besapi
12
12
 
13
13
 
14
+ # NOTE: This does not work as expected when run from plugin_utilities
14
15
  def get_invoke_folder(verbose=0):
15
16
  """Get the folder the script was invoked from"""
16
17
  # using logging here won't actually log it to the file:
@@ -30,6 +31,7 @@ def get_invoke_folder(verbose=0):
30
31
  return invoke_folder
31
32
 
32
33
 
34
+ # NOTE: This does not work as expected when run from plugin_utilities
33
35
  def get_invoke_file_name(verbose=0):
34
36
  """Get the filename the script was invoked from"""
35
37
  # using logging here won't actually log it to the file:
@@ -98,7 +100,7 @@ def setup_plugin_logging(log_file_path="", verbose=0, console=True):
98
100
  log_level = logging.WARNING
99
101
  if verbose:
100
102
  log_level = logging.INFO
101
- print("INFO: Log File Path: %s", log_file_path)
103
+ print("INFO: Log File Path:", log_file_path)
102
104
  if verbose > 1:
103
105
  log_level = logging.DEBUG
104
106
 
@@ -111,14 +113,16 @@ def setup_plugin_logging(log_file_path="", verbose=0, console=True):
111
113
  # log output to console if arg provided:
112
114
  if console:
113
115
  handlers.append(logging.StreamHandler())
114
-
115
- # setup logging:
116
- logging.basicConfig(
117
- encoding="utf-8",
118
- level=log_level,
119
- format="%(asctime)s %(levelname)s:%(message)s",
120
- handlers=handlers,
121
- )
116
+ print("INFO: also logging to console")
117
+
118
+ # return logging config:
119
+ return {
120
+ "encoding": "utf-8",
121
+ "level": log_level,
122
+ "format": "%(asctime)s %(levelname)s:%(message)s",
123
+ "handlers": handlers,
124
+ "force": True,
125
+ }
122
126
 
123
127
 
124
128
  def get_besapi_connection(args):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: besapi
3
- Version: 3.4.1
3
+ Version: 3.4.2
4
4
  Summary: Library for working with the BigFix REST API
5
5
  Home-page: https://github.com/jgstew/besapi
6
6
  Author: Matt Hansen, James Stewart
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes