aboutsummaryrefslogtreecommitdiff
path: root/src/common/logging/text_formatter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-110/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [common] remove uneeded allocations in logs (#3409)lizzie2026-02-051-11/+17
| | | | | | | | | | | | | | + make filename be a const char also mark as `noexcept` to avoid emission of uneeded unwind paths :) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3409 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] add a `YUZU_STATIC_ROOM` option (#3411)crueter2026-01-281-0/+2
| | | | | | | | | | | Lets you build ONLY the necessary targets to get a statically linked room executable. Only intended to be used on musl targets due to getaddrinfo et al. Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3411 Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [video_core/vic] Partial revert to fix Link Awakening's blue tint (#3348)lizzie2026-01-191-1/+1
| | | | | | | | | | | | fixes link awakening intro screen on non-SSE 4.1 Signed-off-by: lizzie lizzie@eden-emu.dev Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3348 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [common/log] reoder file:func:line to file:line:func for nicer IDE ↵lizzie2026-01-181-1/+2
| | | | | | | | | | | integration with logs (#3321) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3321 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [logging, debugger] remove unescesary logic and only query USER env variable ↵lizzie2025-10-271-96/+53
| | | | | | | | | | | | | once (#2800) - censoring an username would lead to the variable being queried everytime something is written, just store it on a static - dont use a map<> for something that can be done in a switch statment (and that the compiler will optimise for free!!!) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2800 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* Use yuzu as category instead of citraNarr the Reg2023-06-031-1/+1
|
* common: logging: Implement Android logcat backend.bunnei2023-06-031-0/+35
|
* chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to b2eb10382941bef0914f4a0a4685b9033440aa9f
* common: Reduce unused includesameerj2022-03-191-2/+0
|
* common/logging: Move Log::Entry declaration to a separate headerameerj2021-10-011-0/+1
| | | | This reduces the load of requiring to include std::chrono in all files which include log.h
* common: logging: Restructure backend codeMorph2021-06-131-1/+1
|
* common/log: Move Log namespace into the Common namespaceLioncash2021-04-141-2/+2
| | | | | Forgot to move this over when I moved the rest of the source files with lacking namespaces over.
* text_formatter: Avoid unnecessary string temporary creation in PrintMessage()Lioncash2018-10-041-1/+1
| | | | | | | | | operator+ for std::string creates an entirely new string, which is kind of unnecessary here if we just want to append a null terminator to the existing one. Reduces the total amount of potential allocations that need to be done in the logging path.
* logging/text_formatter: Use empty braces for initializing ↵Lioncash2018-08-211-1/+1
| | | | | | | | | CONSOLE_SCREEN_BUFFER_INFO instance The previous form of initializing done here is a C-ism, an empty set of braces is sufficient for initializing (and doesn't potentially cause missing brace warnings, given the first member of the struct is a COORD struct).
* Logging: Create logging macros based on fmtlibDaniel Lim Wee Soong2018-03-221-31/+10
| | | | | | | | | Add a new set of logging macros based on fmtlib Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533 Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet so FMT_VARIADIC is used.
* Format: Run the new clang format on everythingJames Rowe2018-01-201-1/+1
|
* Remove unnecessary WIN32_LEAN_AND_MEAN macro definitionKloen2017-06-301-1/+0
|
* Support mingw cross-compileJannik Vogel2016-12-051-1/+1
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-3/+2
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-21/+31
|
* Use UNREACHABLE macro for impossible cases in previous commitBenjamin Barenblat2015-08-021-2/+2
| | | | Use the UNREACHABLE macro instead of `ASSERT(false, ...);`.
* Handle invalid `Log::Level::Count`Benjamin Barenblat2015-08-021-0/+5
| | | | | | Add a case of `Log::Level::Count` to all switch statements that dispatch on `Log::Level`. The case simply asserts `false` and notes the invalid log level.
* Common: Remove async loggingYuri Kunde Schlesner2015-05-121-17/+2
| | | | | | | | | | | It provided a large increase in complexity of the logging system while having a negligible performance impact: the usage patterns of the ring buffer meant that each log contended with the logging thread, causing it to effectively act as a synchronous extra buffering. Also removed some broken code related to filtering of subclasses which was broken since it was introduced. (Which means no one ever used that feature anyway, since, 8 months later, no one ever complained.)
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-0/+1
|
* Logging: check for filter before sending to the queue, to skip all heavy ↵Emmanuel Gil Peyrot2015-03-061-5/+2
| | | | formatting on the other thread.
* License changepurpasmart962014-12-201-1/+1
|
* Restore the original console color after logging a message.Yuri Kunde Schlesner2014-12-141-13/+23
| | | | Fixes #277
* Add configurable per-class log filteringYuri Kunde Schlesner2014-12-131-2/+6
|
* Implement text path trimming for shorter paths.Yuri Kunde Schlesner2014-12-131-1/+26
|
* Re-add coloring to the console logging output.Yuri Kunde Schlesner2014-12-131-0/+50
|
* New logging systemYuri Kunde Schlesner2014-12-131-0/+47