log¶
Source: base/tealdef/scripts/log.d.tl
Notes
Types of the global log table, the game's script logging functions.
log¶
record global base/tealdef/scripts/log.d.tl:3
global record log
Notes
Global logging functions available to all game scripts.
Functions
verbose(string) base/tealdef/scripts/log.d.tl:4
Notes
Writes a verbose (debug) message to the game log.
Used in the base game: 85 times in 31 files
base/content/climates/climates/gen/mapgenutil.tl:33
base/content/base/base/mod.script.tl:498
base/content/mission/mission/mission_sim.script.tl:126
base/content/mission/mission/mission_framework/mission_framework_react.tl:716
base/content/mission/mission/guide_system/guide_system_react.tl:258
log.verbose("Component " .. desiredGuide.info.targets[1].idOrTag .. " not found for guide: " .. desiredGuide.info.name)
base/content/gui/gui/node_editor/layer_nodes.script.tl:273
… and 25 more files.
message(string) base/tealdef/scripts/log.d.tl:5
Notes
Writes an informational message to the game log.
Used in the base game: 56 times in 30 files
base/content/climates/climates/gen/mapgenutil.tl:260
base/content/base/base/init.lua:127
base/content/base/base/model_metadata_util.lua:1476
log.message("rotationSpeedByLifetime in " .. fileName .. " got removed. Added " .. addRot .. " to rotationSpeed to compensate for the previous value. Please ver
base/content/mission/mission/mission_sim.script.tl:171
base/content/mission/mission/name_util.tl:194
log.message("nameutil tag check completed " .. (err == 0 and "successfully" or ("with " .. err .. " errors")))
base/content/mission/mission/mission_framework/mission_legacy_util.tl:15
… and 24 more files.
warning(string) base/tealdef/scripts/log.d.tl:6
Notes
Writes a warning to the game log.
Used in the base game: 121 times in 68 files
base/content/buildings/townbuildingutil.lua:35
base/content/terrain/reforestation.script.tl:33
log.warning(lang_util.format("Number of tiles per month or steps changed. Old number of tiles was {oldTiles}, new is {newTiles}. Old number of steps was {oldSte
base/content/landmarks/landmark_util.tl:12
base/content/landmarks/landmarks_notification.script.tl:60
base/content/model_editor/model_editor/editor_base_mod.lua:188
log.warning("CARGO ID: " .. oldCargoType .. " converted to " .. resName .. " PLEASE UPDATE: " .. debugContext)
base/content/base/base/mod.script.tl:707
… and 62 more files.
error(string, ?string) base/tealdef/scripts/log.d.tl:7
Notes
Writes an error to the game log.
| Parameter | Type | Description |
|---|---|---|
#1 |
string |
The error message. |
#2 |
?string |
Optional extra context, which the base game uses for the values involved. |
Used in the base game: 211 times in 113 files
base/content/vehicle/vehicle_modifier.script.tl:73
base/content/landmarks/landmarks.script.tl:129
log.error("Unknown carrier: in constructions", "c = " .. c .. ", allConstructions = " .. allConstructions)
base/content/landmarks/landmark_util.tl:89
base/content/landmarks/hq/hq/headquarter.script.tl:89
base/content/base/base/init.lua:242
log.error("Creating globals by assignment is not allowed (variable was )\nDid you forget to add 'local' before your variable?", "key = " .. tostring(key))
base/content/base/base/tl.lua:6911
… and 107 more files.