Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging infrastructure update #256

Merged
merged 11 commits into from
Mar 10, 2024
Merged

Conversation

sean-gilliam
Copy link
Collaborator

This PR replaces all references to the old RS.Bug/RS.Log to the new CLogger methods.

Things to note:

  • Removed the fmt library since spdlog already bundled it. All references switched to the one under spdlog.

  • Tied errno messages previously displayed by perror to std::strerror(errno) so those messages flow through our logging infra.

  • bugout/bugexit still exists for the time being so we can come up with a logging plan for them.

Sorry for this extremely hefty PR. I broke it out over several commits to help digest it more easily. Let me know if you have questions/concerns.

@sean-gilliam
Copy link
Collaborator Author

Here's what the console looks like on error.

rs-console-error

Here's what the console looks like with a clean run.
rs-console good

@sean-gilliam sean-gilliam requested review from rezalas and Psypher9 March 8, 2024 23:52
@sean-gilliam
Copy link
Collaborator Author

Here's what the log file shows on a clean run

[2024-03-09 00:05:23.427] [rs] [info] *** Beginning RIFTSHADOW MUD server ***
[2024-03-09 00:05:23.427] [rs] [info] Creating persistent SQL connection...
[2024-03-09 00:05:23.428] [rs] [info] Loading options and greeting screen...
[2024-03-09 00:05:23.428] [rs] [info] Loading class and race data...
[2024-03-09 00:05:23.428] [rs] [info] Initialize random number generator...
[2024-03-09 00:05:23.428] [rs] [info] Setting time, weather, and berus/calabren pos...
[2024-03-09 00:05:23.428] [rs] [info] Assigning gsns and psns to skills and spells...
[2024-03-09 00:05:23.428] [rs] [info] Reading the race info...
[2024-03-09 00:05:23.428] [rs] [info] Sorting area list..
[2024-03-09 00:05:23.428] [rs] [info] Loading area files..
[2024-03-09 00:05:23.429] [rs] [info] Loading area files now...
[2024-03-09 00:05:23.533] [rs] [info] Starting player file parsing..
[2024-03-09 00:05:23.533] [rs] [info] Loading object counts off players now...
[2024-03-09 00:05:23.534] [rs] [info] Object Limits loaded
[2024-03-09 00:05:23.534] [rs] [info] Cabal Limits loaded
[2024-03-09 00:05:23.538] [rs] [info] Exits fixed
[2024-03-09 00:05:23.558] [rs] [info] Adjacent areas found
[2024-03-09 00:05:23.558] [rs] [info] Notes cleaned
[2024-03-09 00:05:23.580] [rs] [info] Area update
[2024-03-09 00:05:23.581] [rs] [info] Allocating gold
[2024-03-09 00:05:23.581] [rs] [info] Cabal Items loaded
[2024-03-09 00:05:23.581] [rs] [info] Priming weather
[2024-03-09 00:05:23.581] [rs] [info] Riftshadow booted, binding on port 9999.

@sean-gilliam
Copy link
Collaborator Author

We can update the logging pattern later. This was just the bare-bones first attempt to get something together.

code/devextra.c Outdated Show resolved Hide resolved
code/sql.c Outdated Show resolved Hide resolved
code/sql.c Outdated Show resolved Hide resolved
code/sql.c Outdated Show resolved Hide resolved
code/update.c Outdated Show resolved Hide resolved
@Psypher9
Copy link
Collaborator

Psypher9 commented Mar 9, 2024

These log screen caps look beautiful

@sean-gilliam
Copy link
Collaborator Author

These log screen caps look beautiful

Gruvbox Material Dark theme

@sean-gilliam sean-gilliam requested a review from Psypher9 March 9, 2024 19:51
@rezalas
Copy link
Owner

rezalas commented Mar 10, 2024

This is awesome progress man!!! I'm looking forward to this so I can rebase and continue work on the stored procedures.

@rezalas rezalas merged commit 47049c4 into rezalas:main Mar 10, 2024
3 checks passed
@sean-gilliam sean-gilliam deleted the integrate-logger branch March 10, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants