summaryrefslogtreecommitdiffstats
path: root/src/common/logging/backend.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Refactor Logging ImplLevi Behunin2021-11-021-0/+2
| | | | | | | Loop on stop_token and remove final_entry in Entry. Move Backend thread out of Impl Constructor to its own function. Add Start function for backend thread. Use stop token in PopWait and check if entry filename is nullptr before logging.
* logging: Simplify and make thread-safeyzct123452021-08-131-106/+7
| | | | | | | | | This simplifies the logging system. This also fixes some lost messages on startup. The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation. With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
* common: logging: Restructure backend codeMorph2021-06-131-27/+1
|
* common: logging: backend: Wrap IOFile in a unique_ptrMorph2021-06-131-2/+13
| | | | Allows us to forward declare Common::FS::IOFile.
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
* log/backend: Use in-class initializer for FileBackendLioncash2021-04-201-2/+2
| | | | We can also avoid redundant constructions of the same string repeatedly.
* common/log: Move Log namespace into the Common namespaceLioncash2021-04-151-2/+2
| | | | | Forgot to move this over when I moved the rest of the source files with lacking namespaces over.
* common/fileutil: Convert namespace to Common::FSLioncash2020-08-161-1/+1
| | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
* logging/backend: Make use of designated initializersLioncash2020-08-031-10/+4
| | | | Same behavior, less code.
* common/logging: don't use regex for path trimmingBreadFish642020-01-231-1/+1
|
* logging/backend: Move CreateEntry into the Impl classLioncash2019-03-021-4/+0
| | | | | This function is only ever used within this source file and makes it easier to remove static state in the following change.
* threadsafe_queue: Add WaitIfEmpty and use it in loggingB3n302019-02-151-0/+1
|
* logging: Add DebuggerBackend for logging to Visual StudioCarl Kenner2018-10-071-0/+14
|
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-1/+1
|
* logging/backend: Add missing standard includesLioncash2018-07-201-2/+0
| | | | | A few inclusions were being satisfied indirectly. To prevent breakages in the future, include these directly.
* logging/backend: Use std::string_view in RemoveBackend() and GetBackend()Lioncash2018-07-201-2/+3
| | | | | | These can just use a view to a string since its only comparing against two names in both cases for matches. This avoids constructing std::string instances where they aren't necessary.
* Add configurable logging backendsJames Rowe2018-07-031-3/+84
|
* Logging: Create logging macros based on fmtlibDaniel Lim Wee Soong2018-03-221-2/+5
| | | | | | | | | 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-211-1/+1
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-1/+0
| | | | | | | 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-4/+2
|
* backend: defaulted move constructor/assignmentLioncash2016-02-051-18/+2
|
* Common: Remove async loggingYuri Kunde Schlesner2015-05-121-80/+12
| | | | | | | | | | | 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.)
* Logging: check for filter before sending to the queue, to skip all heavy formatting on the other thread.Emmanuel Gil Peyrot2015-03-061-0/+3
|
* License changepurpasmart962014-12-211-1/+1
|
* New logging systemYuri Kunde Schlesner2014-12-131-0/+134