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: 75 times in 31 files
base/content/base/base/mod.script.tl:498
base/content/climates/climates/gen/mapgenutil.tl:33
base/content/game_mechanics/game_mechanics/company/company.script.tl:127
base/content/game_mechanics/game_mechanics/company/company_growth.script.tl:145
base/content/game_mechanics/game_mechanics/company/company_util.tl:129
base/content/game_mechanics/game_mechanics/emission/emissions.script.tl:266
… 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: 58 times in 31 files
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/climates/climates/gen/mapgenutil.tl:260
base/content/game_mechanics/game_mechanics/achievements/achievements.script.tl:85
log.message(lang_util.format("Updating legacy achievement state from version: {fromVersion} to version: {toVersion}", {
base/content/game_mechanics/game_mechanics/company/company.script.tl:397
base/content/game_mechanics/game_mechanics/company/company_growth.script.tl:59
… and 25 more files.
warning(string) base/tealdef/scripts/log.d.tl:6
Notes
Writes a warning to the game log.
Used in the base game: 122 times in 70 files
base/content/base/base/difficulty_util.tl:239
log.warning(lang_util.format("Did not find {modParam}, hence no difficulty scale can be provided.", { modParam = modParam }))
base/content/base/base/metadataanimationutil.lua:61
log.warning(string.format("metadataanimationutil.attachAnimations %s animation already exists - config ignored! fileName: %s", eventName, fileName))
base/content/base/base/mod.lua:180
base/content/base/base/mod.script.tl:707
base/content/buildings/townbuildingutil.lua:35
base/content/game_mechanics/game_mechanics/company/company.script.tl:260
… and 64 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: 218 times in 114 files
base/content/base/base/init.lua:246
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
log.error("teal (content/base/tl.lua): search_for not implemented: with suffix", "module_name = " .. tostring(module_name) .. ", suffix = " .. tostring(suffix))
base/content/game_mechanics/game_mechanics/company/explorations/exploration_plane.script.tl:102
base/content/game_mechanics/game_mechanics/finance/finances_loan_gui.tl:391
base/content/game_mechanics/game_mechanics/fun_elements/custom_entity_util.tl:25
base/content/game_mechanics/game_mechanics/fun_elements/ufo_util.tl:71
… and 108 more files.