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

Logging clean up #1190

Merged
merged 4 commits into from
Dec 31, 2023
Merged

Logging clean up #1190

merged 4 commits into from
Dec 31, 2023

Conversation

bevans2000
Copy link
Member

This PR appears large but it is actually quite simple changes. Its purpose is to clean up the use of SimLogger in preparation of the 2nd phase to replace lovable with NamedEntity. Thus covers the following:

  • Consolidate the methods in the SimLogger class.
  • Remove the getNickName method as it duplicates the name attribute
  • clean up references in BinResource

Phase 1 of #647

Changes:
- Remove no longer needed Basket, Crate & Pot
- AmountResourceBin takes the bintype as a constructor parameter
- BinFactory has sole responsibility for creating Bins
- EquipmentInventory uses BinFactory for creation
- AmountResourceBin just has a single owner instead of 2; remove use of Entity

Part of #647
There were too many method in SimLogger with overlapping responsibilities. Theseneed cleaning up before
any logging changes are done.

Changes:
- SimLogger generic open 'log' method is gone and the specific warning, severe & info are used throughout.
- Calls to the remaining generic 'log' method with an Actor are reduced
- SimLogger no longer takes a Location parameter; relies on Actor. In nearly all cases the location is redundant and not needed.
- Explict is Crop which needs the new getContext approach
- ExitAirlock & EnterAirlock remove the massive inconsistencies in how logging is used. Uses airlock.getEntityName() instead of dangerous toString methods.

Part of #647
None of the Unit classes use a different Nick Name so it is always defaulted to the name property; henc ethe method is redundant.
The core of the logic should always use the offical unit name.

Changes:
- Unit remove the getNickName method
- Replace all calls to getNickname with getName

Part of #647
@bevans2000 bevans2000 changed the title Logging issue647 Logging clean up Dec 31, 2023
@mokun mokun merged commit ec7d817 into master Dec 31, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants