-
Notifications
You must be signed in to change notification settings - Fork 126
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
Cherry pick logging refactor from primedev #617
base: main
Are you sure you want to change the base?
Cherry pick logging refactor from primedev #617
Conversation
* Add basic logging functions * Move to new logging functions * Fix compilation * Gracefully terminate when our directory isnt writable * Add `-wconsole` argument * Use new functions in more places * Add helper funcs * Thanks spoon * Print to game console * Stop using NS::log and spdlog:: in squirrel * add log context string to each print * Print to win terminal * Don't automatically add eol * Properly shutdown spdlog * Fixup some messages * Formatting * Use spaces in CMakeLists.txt * Formatting * Use new funcs fol plugin log * Always allocate console when we'rea dedi * Update dedilogtoclient * Remove old logging classes * Fix PLUGIN_LOG * Color logging * Don't log searchpath * Fix masterserver error log * Properly break in switch in spew func * Remove comment * Log to disk * Format * Terminate on fatal error call * Improve doc comments in `dbg.cpp` * Use displayName for plugin logging * Improve more doc comments * add `-nologfiles` argument * Rename `g_bSpdLog_UseAnsiColor` to `g_bConsole_UseAnsiColor` * Add plugin color * Adjust colors * Add missing newlines * Fix specifier * Separate SQ_GetLogContext into native and script versions * Replace spdlog::info i missed * Format * Only close console once gamewindow has been created * Improve log categories * Fix compile error context * Fix missed format in `scriptdatatables.cpp` * Rename `pszAnsiString` to `svAnsiString` * Add lock guard * Don't try to show messagebox when we're a dedicated server on error * Rename `fLogger` to `pLogger` * Use new funcs for system info * Rename `StartupLog` to `Sys_PrintOSVer` * Initilaze `g_svLogDirectory` directly in `InitilazeNorthstar` * Cleanup `InitilaseNorthstar` * Add back ntdll check
…PlaysGames/NorthstarLauncher into primedev-refactor/logging
cant the |
Yeah, this was just me porting the refactor over without any changes |
The |
If i was working on refactoring logging now I'd probably have Also having logging levels behind a general convar is a good idea. |
I definitely agree about the separation between |
100% agree on that ^^" |
So how do we approach this? Change |
Id say changing it back would be beyond the scope of the cherry pick. Also changing it back now would make future primedev integrations more annoying |
I'd so, stick with Could test late tonight. If someone else could give it a try earlier than that, would be perfect so that we can get it merged ASAP. ^^ Footnotes
|
Yup works for me, Fifty might even make some more logging refactors between now and then anyway on primedev given the conversation thus far |
Man i wish i could compile locally right now instead of having to do everything inside github |
I have moved this back to the old 1 file format, slight change to the actual text formatting though i think? idk. anyway yeah hopefully this can get merged now as a simple code refactor |
nslog2024-01-18 21-48-31.txt |
Console window closing when game is launched is intentional, right? |
think so, yeah |
|
Merge conflicts atm btw ._. |
Should be dealt with |
Testing checklist:
(If anyone already did one of these, LMK so I can check them off as done) |
Tested under Fedora 39 with and without gamescope with no issues. |
Perfect, thanks <3 |
Honestly I only half like this refactor, I would prefer if we used the
{}
style of formatting stuff among other things.Anyway this PR isn't about my opinion so whatever