Files
Bubberstation/code/__HELPERS/logging/debug.dm
SkyratBot 120041c693 [MIRROR] Converts del logging to proper json, using json objects instead of building a text file [MDB IGNORE] (#21448)
* Reverts qdel logging to a raw text file (#75632)

## About The Pull Request

We log this information once, on SSgarbage shutdown. Putting it in a
json is kinda pointless, it exists to be read when we see massive
overtime from ssgarbage, that's all.

Something something reee my workflow.

## Changelog
🆑
server: qdel statistics are once again logged in qdel.log, instead of
the otherwise typical json logging system
/🆑

* Converts del logging to proper json, using json objects instead of building a text file (#75636)

## About The Pull Request

It's easier to parse, and makes more sense when you read it. This way
I'll never have to add yet another case to my parser for someone
changing where a space goes or something.

Moves qdel into its own category cause the old name looked ugly (yell if
this is dumb)
Added a bitfield to entries pulled from categories, adds a new flag that
enables pretty printing json lists.


## Why It's Good For The Game

IMPROVES my workflow

## Changelog
🆑
server: del logging is now done by outputting to a json file again, but
this time we're using ACTUAL json and not just a big text string with
newlines and shit
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-05-31 17:05:23 -04:00

62 lines
1.7 KiB
Plaintext

/// Logging for loading and caching assets
/proc/log_asset(text, list/data)
logger.Log(LOG_CATEGORY_DEBUG_ASSET, text, data)
/// Logging for config errors
/// Rarely gets called; just here in case the config breaks.
/proc/log_config(text, list/data)
logger.Log(LOG_CATEGORY_CONFIG, text, data)
SEND_TEXT(world.log, text)
/proc/log_filter_raw(text, list/data)
logger.Log(LOG_CATEGORY_FILTER, text, data)
/// Logging for job slot changes
/proc/log_job_debug(text, list/data)
logger.Log(LOG_CATEGORY_DEBUG_JOB, text, data)
/// Logging for lua scripting
/proc/log_lua(text, list/data)
logger.Log(LOG_CATEGORY_DEBUG_LUA, text, data)
/// Logging for mapping errors
/proc/log_mapping(text, skip_world_log)
#ifdef UNIT_TESTS
GLOB.unit_test_mapping_logs += text
#endif
logger.Log(LOG_CATEGORY_DEBUG_MAPPING, text)
if(skip_world_log)
return
SEND_TEXT(world.log, text)
/// Logging for game performance
/proc/log_perf(list/perf_info)
. = "[perf_info.Join(",")]\n"
WRITE_LOG_NO_FORMAT(GLOB.perf_log, .)
/// Logging for hard deletes
/proc/log_qdel(text, list/data)
logger.Log(LOG_CATEGORY_QDEL, text, data)
/* Log to the logfile only. */
/proc/log_runtime(text, list/data)
logger.Log(LOG_CATEGORY_RUNTIME, text, data)
/proc/log_signal(text, list/data)
logger.Log(LOG_CATEGORY_SIGNAL, text, data)
/// Logging for DB errors
/proc/log_sql(text, list/data)
logger.Log(LOG_CATEGORY_DEBUG_SQL, text, data)
/// Logging for world/Topic
/proc/log_topic(text, list/data)
logger.Log(LOG_CATEGORY_GAME_TOPIC, text, data)
/// Log to both DD and the logfile.
/proc/log_world(text, list/data)
#ifdef USE_CUSTOM_ERROR_HANDLER
logger.Log(LOG_CATEGORY_RUNTIME, text, data)
#endif
SEND_TEXT(world.log, text)