Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/log secc settings #176

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions iso15118/secc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ async def main():
"""
config = Config()
config.load_envs()
config.log_settings()

sim_evse_controller = await SimEVSEController.create()
await sim_evse_controller.set_status(ServiceStatus.STARTING)
Expand Down
5 changes: 4 additions & 1 deletion iso15118/secc/secc_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,13 @@ def load_envs(self, env_path: Optional[str] = None) -> None:
self.standby_allowed = env.bool("STANDBY_ALLOWED", default=False)

env.seal() # raise all errors at once, if any
self.secc_env = env.dump()

def log_settings(self):
logger.info("SECC settings:")
for key, value in shared_settings.items():
logger.info(f"{key:30}: {value}")
for key, value in env.dump().items():
for key, value in self.secc_env.items():
logger.info(f"{key:30}: {value}")

def load_requested_protocols(self, read_protocols: Optional[List[str]]):
Expand Down