diff --git a/code/__DEFINES/logging.dm b/code/__DEFINES/logging.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index ce6ce9d7650..3dd0f9235bd 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -98,7 +98,8 @@ /proc/log_after_setup(var/message) if(ticker && ticker.current_state > GAME_STATE_SETTING_UP) to_chat(world, "[message]") - log_to_dd(message) + log_to_dd(message) + // Helper procs for building detailed log lines /proc/datum_info_line(var/datum/d) diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 005ef4c2fc9..7e4fca82c32 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -79,7 +79,7 @@ if(4.0) return EAST if(8.0) return WEST else - log_to_dd("UNKNOWN DIRECTION: [direction]") + log_runtime(EXCEPTION("UNKNOWN DIRECTION: [direction]")) /proc/dir2text(direction) switch(direction) diff --git a/code/datums/helper_datums/map_template.dm b/code/datums/helper_datums/map_template.dm index f4f636f984c..d58ecd6e287 100644 --- a/code/datums/helper_datums/map_template.dm +++ b/code/datums/helper_datums/map_template.dm @@ -73,7 +73,7 @@ . = file(mappath) if(!.) - log_to_dd(" The file of [src] appears to be empty/non-existent.") + log_runtime(EXCEPTION(" The file of [src] appears to be empty/non-existent."), src) /datum/map_template/proc/get_affected_turfs(turf/T, centered = 0) var/turf/placement = T diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 75690ed84e2..b2257a262b6 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -80,7 +80,7 @@ /datum/mind/proc/transfer_to(mob/living/new_character) if(!istype(new_character)) - log_to_dd("## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn") + log_runtime(EXCEPTION("transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob."), src) if(current) //remove ourself from our old body's mind variable current.mind = null diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index 57a24ed56da..6d26555ca56 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -207,6 +207,5 @@ var/global/max_secret_rooms = 6 new garbage(T) areapoints -= 5 emptyturfs -= T - //log_to_dd("The [theme] themed [T.loc] has been created!") return 1 diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 73694f9a5c2..e63221970c0 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -29,7 +29,7 @@ /mob/living/captive_brain/say_understands(var/mob/other, var/datum/language/speaking = null) var/mob/living/simple_animal/borer/B = src.loc if(!istype(B)) - log_to_dd("Trapped mind found without a borer!") + log_runtime(EXCEPTION("Trapped mind found without a borer!"), src) return 0 return B.host.say_understands(other, speaking) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index b487b6518c0..f8e1575efc1 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -303,7 +303,7 @@ enthrall_safe = 1 break if(!C) - log_to_dd("something bad happened on enthralling a mob, attacker is [user] [user.key] \ref[user]") + log_runtime(EXCEPTION("something bad happened on enthralling a mob, attacker is [user] [user.key] \ref[user]"), user) return 0 if(!C.mind) to_chat(user, "[C.name]'s mind is not there for you to enthrall.") diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index 7deaebe9266..489e68acec7 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -161,7 +161,7 @@ mages_made++ return 1 else - log_to_dd("The candidates list for ragin' mages contained non-observer entries!") + log_runtime(EXCEPTION("The candidates list for ragin' mages contained non-observer entries!"), src) return 0 // ripped from -tg-'s wizcode, because whee lets make a very general proc for a very specific gamemode diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index cb52b56edb8..47b6c1bf57b 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -1232,13 +1232,13 @@ steam.start() -- spawns the effect var/amount = 6.0 anchored = 1.0 mouse_opacity = 0 + /obj/effect/sparkles/New() ..() var/icon/I = new(src.icon,src.icon_state) var/r = rand(0,255) var/g = rand(0,255) var/b = rand(0,255) - log_to_dd("Colour , [r],[g],[b]") I.Blend(rgb(r,g,b),ICON_MULTIPLY) src.icon = I playsound(src.loc, "sparks", 100, 1) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index d14c48a761e..150cbf2ee4b 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -352,7 +352,7 @@ if(ghost && !ghost.client) // In case the ghost's not getting deleted for some reason H.key = ghost.key - log_to_dd("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost.") + log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src) qdel(ghost) ghost = null @@ -499,7 +499,7 @@ if(ghost && !ghost.client) // In case the ghost's not getting deleted for some reason H.key = ghost.key - log_to_dd("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost.") + log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), H) qdel(ghost) ghost = null diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index b70c2741e83..254b890e7b3 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -56,6 +56,7 @@ //search the href for script injection if( findtext(href,"Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].") else - log_to_dd("ERROR: Could not initate grey-tide. Unable to find suitable containment area.") + log_runtime("Could not initate grey-tide. Unable to find suitable containment area.", src) kill() /datum/event/prison_break/tick() diff --git a/code/modules/garbage_collection/garbage_collector.dm b/code/modules/garbage_collection/garbage_collector.dm index c33190d4203..6106b2f9130 100644 --- a/code/modules/garbage_collection/garbage_collector.dm +++ b/code/modules/garbage_collection/garbage_collector.dm @@ -163,3 +163,4 @@ var/global/datum/controller/process/garbage_collector/garbageCollector /proc/gcwarning(msg) log_to_dd("## GC WARNING: [msg]") + log_runtime(EXCEPTION(msg)) diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 545be2f8613..f495e5b7f75 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -28,7 +28,7 @@ return if(held_brain) to_chat(user, "Somehow, this MMI still has a brain in it. Report this to the bug tracker.") - log_to_dd("[user] tried to stick a [O] into [src] in [get_area(src)], but the held brain variable wasn't cleared") + log_runtime(EXCEPTION("[user] tried to stick a [O] into [src] in [get_area(src)], but the held brain variable wasn't cleared"), src) return for(var/mob/V in viewers(src, null)) V.show_message("[user] sticks \a [O] into \the [src].") @@ -101,7 +101,7 @@ //problem i was having with alien/nonalien brain drops. /obj/item/device/mmi/proc/dropbrain(var/turf/dropspot) if(isnull(held_brain)) - log_to_dd("[src] at [loc] attempted to drop brain without a contained brain in [get_area(src)].") + log_runtime(EXCEPTION("[src] at [loc] attempted to drop brain without a contained brain in [get_area(src)]."), src) to_chat(brainmob, "Your MMI did not contain a brain! We'll make a new one for you, but you'd best report this to the bugtracker!") held_brain = new(dropspot) // Let's not ruin someone's round because of something dumb -- Crazylemon held_brain.dna = brainmob.dna.Clone() diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 621efe89ac1..fa466759bcc 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -40,7 +40,7 @@ /obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H) brainmob = new(src) if(isnull(dna)) // someone didn't set this right... - log_to_dd("[src] at [loc] did not contain a dna datum at time of removal.") + log_runtime(EXCEPTION("[src] at [loc] did not contain a dna datum at time of removal."), src) dna = H.dna.Clone() name = "\the [dna.real_name]'s [initial(src.name)]" brainmob.dna = dna.Clone() // Silly baycode, what you do diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index ea9dffd3ca0..f496e3d556c 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -72,7 +72,7 @@ // This should not ever happen, but let's be safe /obj/item/device/mmi/posibrain/dropbrain(var/turf/dropspot) - log_to_dd("[src] at [loc] attempted to drop brain without a contained brain.") + log_runtime(EXCEPTION("[src] at [loc] attempted to drop brain without a contained brain."), src) return /obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H) diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 341d5b8131b..8606dafbd31 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -244,7 +244,7 @@ /datum/nano_module/appearance_changer/proc/can_change_head_accessory() if(!head_organ) - log_runtime(EXCEPTION("Missing head!"), src) + log_runtime(EXCEPTION("Missing head!"), owner) return 0 return owner && (flags & APPEARANCE_HEAD_ACCESSORY) && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY) diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 3ca6c591705..05240d477f3 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -646,7 +646,7 @@ return 1 if(!shuttle_master) - log_to_dd("## ERROR: The shuttle_master controller datum is missing somehow.") + log_runtime(EXCEPTION("The shuttle_master controller datum is missing somehow."), src) return 1 if(href_list["send"]) diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index d549b2ec997..eca74a216b2 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -318,7 +318,7 @@ Large: Whether the splat should be big or not R.reaction_turf(T, R.volume) return else if(source) - log_to_dd("Non-human or reagent blood source. Area: [get_area(source)], Name: [source]") + log_runtime(EXCEPTION("Non-human or reagent blood source. Area: [get_area(source)], Name: [source]"), source) // Are we dripping or splattering? var/list/drips = list() diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 26d50abaa75..66436d22b64 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -46,7 +46,7 @@ var/list/organ_cache = list() dna = holder.dna.Clone() species = all_species[dna.species] else - log_to_dd("[src] at [loc] spawned without a proper DNA.") + log_runtime(EXCEPTION("[holder] spawned without a proper DNA."), holder) var/mob/living/carbon/human/H = holder if(istype(H)) if(dna)