Skip to content

Commit

Permalink
Merge pull request #14 from CMDR-WDX/13-logger-throws-errors-unless-t…
Browse files Browse the repository at this point in the history
…he-plugin-folder-is-named-massacre

13 logger throws errors unless the plugin folder is named massacre
  • Loading branch information
CMDR-WDX authored Dec 10, 2022
2 parents 55ddcbd + ed80a6a commit 665c2e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions load.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os
import tkinter
from typing import Optional
from os.path import basename, dirname

from massacre.mission_aggregation_helper import get_missions_for_all_cmdrs
import massacre.massacre_mission_state

from massacre.ui import ui
from massacre.logger_factory import logger
Expand Down Expand Up @@ -43,7 +43,7 @@ def notify_ui_on_outdated(is_outdated: bool):
set_new_repo(mission_uuid_to_mission_lookup)

logger.info("Awaiting CMDR Name to start building Mission Index")
return "massacre"
return basename(dirname(__file__))


def journal_entry(cmdr: str, _is_beta: bool, _system: str,
Expand Down
4 changes: 3 additions & 1 deletion massacre/logger_factory.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from pathlib import Path
import logging
import os
from os.path import basename, dirname
import config

_plugin_name = "massacre"
_plugin_name = basename(Path(dirname(__file__)).parent)


def __build_logger_for_module() -> logging.Logger:
Expand Down

0 comments on commit 665c2e0

Please sign in to comment.