Commit Graph

25 Commits

Author SHA1 Message Date
Jacquerel
d0e2bfe85c Increases logging for candidate polls (#91590)
## About The Pull Request

The game will now log when someone signs up or removes their candidacy
for ghost polls for roles.

This also fixes a runtime I experienced while testing it and running
pirates with no candidates signed up, IDK if it had any effect but it's
possible the runtime was causing the ship not to spawn.

## Why It's Good For The Game

Mostly just that I saw admins requesting this on several recent
occasions.
It's already possible to dig up some of this information through the
existing logs but it's a bit of a pain.

## Changelog

🆑
admin: Additional logging for when people sign up for ghost roles.
/🆑
2025-07-07 11:27:43 -04:00
Lucy
2719ca1866 update rust-g to 3.9.0 and use formatted_timestamp for human_readable_timestamp (#91121) 2025-05-14 14:56:37 -07:00
TiviPlus
88c2213f1e Force UTC±0 for time2text logging and IC times (#90347)
## About The Pull Request
This won't actually do anything on live, since those are all set to
UTC±0 currently

Pins logging and IC uses of time2text to UTC±0 instead of using the
system timezone (byond default)
Timezones not being set to utc0 caused issues before (and is again)

All timezones are now passed explicitly to make it more likely it's
cargo culted properly at least

Deletes worldtime2text cus it was gameTimestamp default args

## Why It's Good For The Game
Server timezone changes probably shouldn't affect logging, round times,
file hashes, IC time, when you caught fish, etc

## Changelog
🆑
refactor: Logging and IC timestamps will now always use UTC±0 and not be
affected by server system timezone changes
fix: Station and round times will not longer be incorrect if the system
timezone is not UTC±0
/🆑

---------

Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2025-04-01 22:08:15 +02:00
Lucy
d656f0f4ec Refactor GLOB.admin/debug/fun_state into cached /datum/ui_state/admin_state instances (#89417)
## About The Pull Request

So, some admin verbs/tools that used tguis, i.e edit/debug planes, were
available to admins with +DEBUG... but the ui_state used
`GLOB.admin_state`, which checks for +ADMIN - meaning that if they
_only_ had +DEBUG, they would have the verb... but it would do nothing
when they used it.

I've refactored `GLOB.admin_state`, `GLOB.debug_state`, and
`GLOB.fun_state` into a merged `/datum/ui_state/admin_state`, with a var
for which specific permissions are being checked for.

You now use the `ADMIN_STATE(perms)` macro to get the UI state for those
specific perms, i.e `admin_state(R_ADMIN)` or `admin_state(R_DEBUG)`,
and the resulting UI state will check for _those specific perms_.

These are initialized and cached in `GLOB.admin_states` (which should
never be directly accessed).

So, I've went thru every single usage of `GLOB.admin_state`,
`GLOB.fun_state`, and `GLOB.debug_state`, and made them all use
`ADMIN_STATE()` with the actual permission flags needed to use said UI
in the first place.

## Why It's Good For The Game

Kinda dumb for specific admin permissions to be granted verbs that don't
let them use it anyways.

## Changelog
🆑
admin: Certain UI-based tools (plane debugger, filter editor, etc) that
were given to admins with only +VAREDIT or +DEBUG, but refused to open
without +ADMIN, now actually work for admins that have the needed
permission.
/🆑
2025-02-17 00:54:00 +01:00
Watermelon914
eac4df19ac Adds TTS logging when something goes wrong (#88841)
## About The Pull Request
Logs whenever there's a HTTP error on the DM side of TTS.

## Why It's Good For The Game

Can help identify bugs and errors.

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2025-01-03 13:02:27 -05:00
Zephyr
7f8752be14 Admin Verb Datums MkIII | Now with functional command bar (#82511) 2024-04-12 12:27:09 -07:00
_0Steven
7f8ea34a0e Makes attempting to refresh the logs not just throw a runtime error (#82432)
## About The Pull Request

Really all this seems to be is a mismatch between the tgui and dm side
of the menu.

3c71b14df0/tgui/packages/tgui/interfaces/LogViewer.tsx (L71)

3c71b14df0/code/modules/logging/log_holder.dm (L110-L113)
Making these line up by renaming `re-render` to `refresh` seems to make
it work just fine, and not just throw an error.
## Why It's Good For The Game

Life tends to be better when refreshing to see new runtimes doesn't just
add its own lovely little runtimes.

![image](https://github.com/tgstation/tgstation/assets/42909981/79bee3db-5c28-409b-9ff5-3a315fb4ed1c)

![image](https://github.com/tgstation/tgstation/assets/42909981/82a25038-ba7a-430a-bb79-f59d5f4b262b)
And then not show them til you re-open the window cause it doesn't
refresh.
## Changelog
🆑
admin: Refresh button on the View Round Logs menu actually works,
instead of just adding a runtime to the logs (and not updating them).
/🆑
2024-04-04 18:57:04 -06:00
ArcaneMusic
9802508ab9 Adds logging to SSore_generation on subsystem initialize (#81488)
This PR adds a new logging category and a logging message specific to
SSore_generation's initialize, logging the number of vents of each size,
as well as the number of random and proximity based ore spawns due to
cave generation and map generation.

Currently drafted as I could use some feedback as to why I'm not seeing
the logger.log() messages not appearing on any of the current in-game
log files 👍

Useful for data logging to determine how many of each type of ore is
spawned on the map, for the purposes of determining how much ore is
being spawned manually over the automatic amounts based on the vents,
with the quantity of ores spawning being a product of the ore vent sizes
being logged as well.
2024-03-14 21:25:50 +00:00
MrMelbert
79244dc11f Lint with OpenDream (#81892)
## About The Pull Request

Courtesy of https://github.com/ParadiseSS13/Paradise/pull/21099 and
https://github.com/goonstation/goonstation/pull/18127
2024-03-11 19:31:15 -06:00
MrMelbert
977799a2e7 A red spy has entered the base: Adds Spies, a roundstart antagonist inspired by Goonstation's Spy-Thief (#81231)
# Disclaimer: No Goon code was referenced or used in the making of this
PR

## About The Pull Request

[Design Document (Read this for more
information)](https://hackmd.io/@L9JPMsZhRO2wI25rNI6GYg/rkYKM9Yc6)

This PR adds Spies as a new roundstart antagonist type, inspired by
Spy-Thiefs from Goonstation.

Spies are tasked with stealing various objects around the station, from
insulated gloves to the black box, from the clown's left leg to the
bridge's communications console.

For every item stolen, the Spy is rewarded with a random item from the
Syndicate Uplink, plus some items uniquely available to the Spy. Stolen
items are then shipped off and sold on the Black Market Uplink, allowing
the crew - or maybe some other evil-doers - to get their hands on them.


![image](https://github.com/tgstation/tgstation/assets/51863163/f057d480-4545-44da-b8fe-a8d09a5d2dcf)

More ideas for theft items and bounties are welcome. 

## Why It's Good For The Game

See the design document for more information. 

In short: Adds a solo antagonist which has less impact than your
Traitors and Heretics, but more impact than Paradox Clones and Thieves.
In other words: On the same tier as old traitors.

Seeks to embrace the sandbox aspect of antagonists more by having no
precise greentext objective, and instead some suggestions for chaos you
can embark in. Have fun with it!

## Changelog

🆑 Melbert
add: Spies may now roam the halls of Space Station 13. Watch your
belongings closely.
/🆑
2024-03-01 04:41:57 +00:00
Zephyr
f2d9e84f36 Logging fixes and catches (#79621)
THIS IS A REDO BECAUSE GITHUB SUCKS ASS

## About The Pull Request

Hardens logging against sudden and unexpected cases where we try to log
to a category that is not initialized or the file goes missing.

## Why It's Good For The Game

Logging needs to be robust and bullet proof
2023-12-10 02:46:05 +00:00
LemonInTheDark
1d6533c525 Bumps compile to 515 (#79134)
## About The Pull Request

LSP supports it, let's GOOOOOO
I've removed the 515 tests since they're stable, alongside the libcall
wrapper. left the rustgcall wrapper cause yaknow memes
Just removed all the 515 and 514 particular define wrappers. gaming

## Changelog
🆑
server: Minimum compile version has been bumped to 515. clients still
support 514 but we're gonna start using 515 restricted features for
serverside now.
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-11-25 21:03:29 -08:00
vvvv-vvvv
6aaae2b1b1 Fix refresh button in log viewer (#79520)
## About The Pull Request

`re-render` is a typo?
137aa7dc60/tgui/packages/tgui/interfaces/LogViewer.tsx (L66)

## Changelog

🆑
fix: Fix refresh button in log viewer
/🆑
2023-11-05 22:32:35 -07:00
lessthanthree
7626c3bd6c Tram v6/Transport Subsystem (#78230)
Co-authored-by: Unit0016 <50649185+unit0016@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2023-10-17 10:52:38 -07:00
Zephyr
d4133d9b43 splits out tgui from the debug master category (#76428)
Splits out tgui from the debug master category at the request of @Fikou 
Removes pointless overrides of internal_format since the default is now
FALSE and also adds an additional comment about ensuring the shit works
if you change the default.

I believe the original reason was that fikou didnt want to sort through
the entire debug log for tgui stuff.
2023-07-11 07:46:29 +00:00
Zephyr
01957bd173 Add check for illegally formatted unix timestamp for logging (#76193)
This runtiming is bad
2023-06-28 14:27:19 +12:00
Zephyr
2f26973584 don't infinitely recurse on attempting to log after shutdown (#76229) 2023-06-23 20:13:34 -06:00
Brett
702a1c02aa Re-add missing categories to externally formatted log files (#76051)
## About The Pull Request
Currently externally-formatted log files (handled by rust-g) do not
include categories. This seems erroneous, and causes a discrepancy
between the internal and externally formatted files as external
formatting only seems to add the timestamp and some newline handling.

Currently:

![image](https://github.com/tgstation/tgstation/assets/10467687/a8979eca-833a-4c44-9d0b-82b9925ddde4)

With this PR:

![image](https://github.com/tgstation/tgstation/assets/10467687/eeeb87ee-3395-4ecc-b97c-ec35f965eac0)


## Why It's Good For The Game

Resolves a disparity between external and internal formatting made
evident by #75972.
## Changelog
🆑 bobbahbrown
server: Fix log categories being erroneously excluded from log files.
/🆑
2023-06-14 22:06:48 +02:00
Kyle Spier-Swenson
14f9ba0af1 all logs are now externally formatted (#75972)
Internal formatting should only be used for logs that include their own
timestamp or don't want one printed.

atm internal formatting does not add the continuation market to newlines
which is an issue that is causing info leak of private loglines.

two logs that always used newlines were manually moved to external
formatting in the original pr, this now makes that the default. a log
type must have a valid reason to format internally now and specifically
request this.

(None of this impacts json logs)

🆑
server: fix logging infoleak from the lack of continuation markets on
new lines.
/🆑
2023-06-10 19:24:04 +00:00
Zephyr
c6205dd063 Adds a new front end for viewing logs | fixes the manifest log message too (#75617)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/12817816/13d5f3c7-c0cc-4930-8119-e6bde66a1f61)

![image](https://github.com/tgstation/tgstation/assets/12817816/034a17d8-c552-4c3a-8e5f-b210fc4231e5)

## Why It's Good For The Game

I promised I would add it; and while it's not as nice as my previous
iteration it is faster and more streamlined.
## Changelog
🆑
admin: new log viewer, try it out. (View Round Logs)
/🆑

Fixes #75605

---------

Co-authored-by: san7890 <the@san7890.com>
2023-05-29 17:56:15 -07:00
LemonInTheDark
b304b6523f 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>
2023-05-26 12:40:18 -06:00
Zephyr
fbec9c14e9 JSON Logging Take Two (#73604)
## About The Pull Request

Converts all logging, excluding perf and investigate, to json.
I focused on making the system as easy to use and as easy to add new
categories as possible.

Due to issues related to logging to world at global creation logger is
now a byond real, which is created directly before Master

Log categories support versioning, secret flagging, and sub-category
filtering. Although all of this is entirely optional for coders.
If you ever want to add a new category and use it, all you need to do is
make the barebones category datum and the define.
I've kept existing procs such as log_game, and simply turned them into a
wrapper for Logger.Log(xxx, ...)
## Why It's Good For The Game

Makes processing and filtering logs much easier in the future, while
only minimally downgrading log crawling experience.
I am also working on a log viewer frontend for admin usage however that
will take a little bit longer to finish up.
Also makes special logging and data tracking much easier thanks to a
data list processing implementation and handling
## Changelog
🆑
server: All logs are now formatted in json, excluding perf and
investigations
/🆑

---------

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-05-22 14:51:00 +12:00
Jordan Dominion
3ceee2aab4 World Initialization Refactor (#74808)
- Removes unnecessary real global vars.
- Adds comments pointing to the init order defined in
/code/game/world.dm.
- Prevent people using `GLOBAL_REAL_VAR` and `GLOBAL_REAL` to circumvent
init order.
- Properly type `PROFILE_STORE` real global.
- Refactored `make_datum_references_lists()` and moved the call to it
into `GLOB` init with duct tape.
- Renamed `GLOB.admin_log` to `GLOB.admin_activities` as it wasn't
actually a log file.
- Whitelist loading happens in config.
- Renamed `SSdbcore`'s `SetRoundID()` to `InitializeRound()`. Now
handles calling `CheckSchemaVersion()`.
- Created macro for setting up log `GLOB`s.
- Removed log line for `GLOB` count.
- Moved call to `make_datum_reference_lists()` to
`/datum/controller/global_vars/Initialize()`. I slimmed it down where
possible too.
- Updated comments about world init order.
- Move `load_admins()` call to after log setup.
- Removes unused function `gib_stack_trace()`.
- Removes a bunch of unused log `GLOB`s.
- Unlocks the secrets of the universe by finally making the first
executed line of code deterministic.

No functional changes. Closes #74792
Testmerge thoroughly.

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-04-24 18:38:38 -06:00
Gamer025
a8457b91f3 Fixes silo logging + add log file based logging to silo (#74806)
## About The Pull Request
Fixes deposit logs not working for the silo because they passed in the
mats argument in the wrong format.
Also adds log file based logging to the silo with a new log file:
silo.log.
This log should contain every deposit and withdraw action performed on
the silo and from which machine and location inluding material amounts.
## Why It's Good For The Game
Fixes broken ingame logs + adds better external logs for potential stat
tracking.
## Changelog
🆑 Gamer025
fix: Ingame ore silo logs should now log deposit actions correctly
config: New config for silo logs
/🆑
2023-04-24 13:47:12 -07:00
Zephyr
18b041bf47 Add logging for manually changing your targeted zone (#72814)
## About The Pull Request

See title.
Surgery hud is exempt from this.
## Why It's Good For The Game

Requested by @Mothblocks 
## Changelog

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: dragomagol <66640614+dragomagol@users.noreply.github.com>
2023-01-23 22:22:24 -08:00