Skip to content

Commit

Permalink
rename logging config function
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Aug 30, 2024
1 parent 1f35bd2 commit d433e02
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion examples/export_all_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ def main():

print(log_file_path)

besapi.plugin_utilities.setup_plugin_logging(log_file_path)
logging_config = besapi.plugin_utilities.get_plugin_logging_config(
log_file_path, verbose, args.console
)

logging.basicConfig(**logging_config)

logging.info("----- Starting New Session ------")
logging.debug("invoke folder: %s", invoke_folder)
Expand Down
2 changes: 1 addition & 1 deletion src/besapi/besapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from lxml import etree, objectify
from pkg_resources import resource_filename

__version__ = "3.4.2"
__version__ = "3.5.1"

besapi_logger = logging.getLogger("besapi")

Expand Down
4 changes: 2 additions & 2 deletions src/besapi/plugin_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ def setup_plugin_argparse(plugin_args_required=False):
return arg_parser


def setup_plugin_logging(log_file_path="", verbose=0, console=True):
"""setup logging for plugin use"""
def get_plugin_logging_config(log_file_path="", verbose=0, console=True):
"""get config for logging for plugin use"""

if not log_file_path or log_file_path == "":
log_file_path = os.path.join(
Expand Down

0 comments on commit d433e02

Please sign in to comment.