-
Notifications
You must be signed in to change notification settings - Fork 755
Description
The map-generator has a number of features and recommendations documented in the README that are performed during map compilation process that do not surface in runtime logs. Provide new map-generator optional flags, and ensure that the basic run command without passing new flags does not change
technical requirements
- use
slog - support standard log levels (INFO, DEBUG)
- log calls should not be impacted by how they will be logged. additional metadata should be opt-in
- should use standard go patterns
verbose
Turns on additional logging during the map generation process (log-level=DEBUG)
-verbose or -v
- When running multiple maps, the log should prefix each line with the map name
- The log should output the land tile count (in addition to the existing water tile counts that are output)
- The log should output the water/land tile counts for the resized maps
-log-removal
Adds additional logging for which specific entities are removed (currently only logs total number)
-log-removal
- The log should output the starting x/y coords of each land/water body removed
- by default this does not run on test maps
- switches to
log-level=DEBUG
-log-performance
Adds additional logging checks for performance-based recommendations (currently only documented in the README)
-log-performance
- original pixel dimension check
- land tile count check
- these produce warnings (not errors)
- these should not output for test maps (that will naturally violate performance checks)
- switches to
log-level=DEBUG
Deliverables*
- Add documentation of all new flags to README
- A slog logger instance, with custom logic for additional flags
- Minimal updates to main/generator in order to use the logger and provide more granularity via
logger.Info,logger.Debug, etc
Additional context
I've modified the script to output all of these things for my own purposes during map making. For broader use these would:
- Enable more complete log analysis of the tool's output
- Provide help when debugging maps as they are iterated on with the generator
- Open the door for other automated tools to interact with the generator as it has a more robust logging mechanism
Metadata
Metadata
Assignees
Labels
Type
Projects
Status