Skip to content

Class

PlacementLogger

Generated GDScript class reference for GridPlacement.PlacementLogger.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

Centralized logging for the Grid Placement plugin. Prefer the static singleton API; it needs no null checks: PlacementLogger.initialize(debug_settings) # once at plugin init PlacementLogger.push_scope(custom_logger) # optional scoped override PlacementLogger.pop_scope() PlacementLogger.debug("msg") PlacementLogger.warn("msg") PlacementLogger.event(PlacementLogger.LogLevel.ERROR, "placement_rejected", {"reason": "..."}) The first initialize() call creates the production root; later calls reuse it while it is alive. Use set_instance() to replace that root. For bounded overrides (one test, one sub-region), use push_scope() / pop_scope(). Tests push a muted or spy logger in before_test and pop it in after_test. The instance API (logger.log_debug("msg")) remains for compatibility. event() emits one machine-readable line per operation: GP|||attempt_id=...|reason=.... Every key/value pair is separated by a pipe, so a console log can be grepped or parsed without a custom reader. push_context() / pop_context() add the correlation fields (attempt id, world id, session id) to every line emitted inside the scope.

Source: addons/grid_placement/logging/placement_logger.gd

Syntax

class PlacementLogger extends RefCounted

Members

NameKindSummary
EVENT_PREFIXFieldThe prefix that marks a structured event line.
LEVEL_NAMESFieldLevel names used in the structured event line.
push_contextMethod
pop_contextMethod
correlationMethod
clear_contextMethod
correlation_suffixMethod
push_scopeMethod
pop_scopeMethod
set_instanceMethod
clear_instanceMethod
initializeMethod
LogLevelFieldShorthand level alias for callsites.
debugMethod
traceMethod
trace_output_enabledMethod
infoMethod
warnMethod
errorMethod
verboseMethod
eventMethod
set_log_sinkMethod
log_atMethod
log_eventMethod
get_runtime_issuesMethod
resolve_placement_dependenciesMethod
is_level_enabledMethod
is_debug_enabledMethod
is_verbose_enabledMethod
is_trace_enabledMethod
log_warningMethod
log_infoMethod
log_errorMethod
log_verboseMethod
log_traceMethod
log_debugMethod
get_debug_settingsMethod