djhackersdev / bemanitools

Runs recent Konami arcade games and emulates various arcade hardware.
The Unlicense
85 stars 16 forks source link

feat: Add core module #290

Open icex2 opened 7 months ago

icex2 commented 7 months ago

feat: Add core module

This module contains the "core" (API) of bemanitools which includes an abstraction layer for threads and logging at this time.

The threads API is very close to what util/thread already was with some structural enhancements which make it easier to understand and work with the API, I hope. Some additional helpers (*-ext module) support in doing common tasks, e.g. setting up the thread API with other modules.

The log(ging) part receives a major overhaul to address known limitations and issues with the util/log module:

Additional "extensions" (*-ext modules) add various helper functions for common tasks like setting up the logging engine with a file and stdout sink.

The sinks also improved significantly with the file sink now supporting proper appending and log rotation. Logging to stdout/stderr supports coloring of log messages which works across logging engines.

Overall, this refactored foundation is expected to support future developments and removes known limitations at the current scale of bemanitools such as:


Stack created with Sapling. Best reviewed with ReviewStack.