summaryrefslogtreecommitdiff
path: root/src/common/logging (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: logging: backend: Close the file after exceeding the write limitGravatar Morph2021-07-061-8/+11
| | | | There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
* Merge pull request #6519 from Wunkolo/mem-size-literalGravatar bunnei2021-06-241-4/+7
|\ | | | | common: Replace common_sizes into user-literals
| * common: Replace common_sizes into user-literalsGravatar Wunkolo2021-06-241-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals.
* | general: Add missing #pragma once directivesGravatar Morph2021-06-241-0/+2
|/
* common: fs: file: Remove [[nodiscard]] attribute from FlushGravatar Morph2021-06-221-1/+1
| | | | Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
* common: fs: Remove [[nodiscard]] attribute on Remove* functionsGravatar Morph2021-06-221-1/+1
| | | | | | There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal. As such, removing the [[nodiscard]] attribute is best for these functions.
* common: logging: Restructure backend codeGravatar Morph2021-06-137-278/+287
|
* common: logging: backend: Wrap IOFile in a unique_ptrGravatar Morph2021-06-132-6/+27
| | | | Allows us to forward declare Common::FS::IOFile.
* common: fs: Rework the Common Filesystem interface to make use of ↵Gravatar Morph2021-05-252-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::filesystem (#6270) * 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 FileBackendGravatar Lioncash2021-04-202-6/+8
| | | | We can also avoid redundant constructions of the same string repeatedly.
* log/backend: Make use of erase_ifGravatar Lioncash2021-04-201-4/+4
| | | | Same behavior, but less verbose.
* Merge pull request #6199 from lioncash/log-nsGravatar bunnei2021-04-147-35/+44
|\ | | | | common/log: Move Log namespace into the Common namespace
| * log/backend: Correct order of const in copy constructorGravatar Lioncash2021-04-141-2/+5
| | | | | | | | | | Follows our predominant coding style. Also explicitly specifies the move constructor/assignment operator as well.
| * common/log: Move Log namespace into the Common namespaceGravatar Lioncash2021-04-147-33/+39
| | | | | | | | | | Forgot to move this over when I moved the rest of the source files with lacking namespaces over.
* | common: Move settings to common from core.Gravatar bunnei2021-04-141-1/+1
|/ | | | - Removes a dependency on core and input_common from common.
* bgtc: Update to 12.x and implement OpenTaskServiceGravatar Morph2021-04-092-0/+2
|
* Address review commentsGravatar FearlessTobi2021-01-041-5/+5
|
* Delete the old log file before rotating (#5675)Gravatar xperia642021-01-041-0/+3
|
* Fix the old log file to work with the log parser.Gravatar bunnei2021-01-031-1/+1
|
* Rotate previous log file to '.old' if it existsGravatar xperia642021-01-031-4/+9
|
* Merge pull request #4451 from slashiee/extended-loggingGravatar bunnei2020-11-231-2/+12
|\ | | | | logging/settings: Increase maximum log size to 100 MB and add extended logging option
| * logging/settings: Increase maximum log size to 100 MB and add extended ↵Gravatar M&M2020-08-241-2/+12
| | | | | | | | | | | | | | logging option The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session. This commit also fixes a few errors that are present in the general debug menu.
* | hle: service: Stub OLSC Initialize and SetSaveDataBackupSettingEnabled ↵Gravatar bunnei2020-11-192-0/+2
| | | | | | | | | | | | functions. - Used by Animal Cross: New Horizons v1.6.0 update, minimal stub gets this update working.
* | common: Enable warnings as errorsGravatar Lioncash2020-11-021-2/+0
|/ | | | Cleans up common so that we can enable warnings as errors.
* common/fileutil: Convert namespace to Common::FSGravatar Lioncash2020-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 initializersGravatar Lioncash2020-08-032-21/+15
| | | | Same behavior, less code.
* common/logging: don't use regex for path trimmingGravatar BreadFish642020-01-233-14/+23
|
* common/logging: Silence no return value warningsGravatar ReinUsesLisp2019-11-151-2/+6
|
* log: Add logging class for Cheat EngineGravatar Zach Hilman2019-09-212-0/+2
| | | This is better than just using something like Common.Filesystem or Common.Memory
* general: Use deducation guides for std::lock_guard and std::unique_lockGravatar Lioncash2019-04-011-3/+3
| | | | | | | Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
* logging/backend: Make time_origin a class variable instead of a local staticGravatar Lioncash2019-03-021-2/+1
| | | | | | | | | Moves local global state into the Impl class itself and initializes it at the creation of the instance instead of in the function. This makes it nicer for weakly-ordered architectures, given the CreateEntry() class won't need to have atomic loads executed for each individual call to the CreateEntry class.
* logging/backend: Move CreateEntry into the Impl classGravatar Lioncash2019-03-022-29/+26
| | | | | This function is only ever used within this source file and makes it easier to remove static state in the following change.
* Adressed review commentsGravatar B3n302019-02-151-1/+2
|
* threadsafe_queue: Add WaitIfEmpty and use it in loggingGravatar B3n302019-02-152-13/+8
|
* logging: Add Vulkan backend logging class typeGravatar ReinUsesLisp2019-02-122-0/+2
|
* Backport review comment from citra-emu/citra#4418Gravatar Tobias2018-12-071-2/+2
| | | | Original reason: As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
* Merge pull request #1441 from CarlKenner/DebuggerLogGravatar bunnei2018-11-052-2/+23
|\ | | | | logging: Add DebuggerBackend for logging to Visual Studio
| * logging: Add DebuggerBackend for logging to Visual StudioGravatar Carl Kenner2018-10-072-2/+23
| |
* | logging/backend: Add missing services to the log filtersGravatar Lioncash2018-10-232-0/+5
| | | | | | | | Just a few overlooked services.
* | service: Add skeleton for psm serviceGravatar Zach Hilman2018-10-201-0/+1
|/ | | | Seems to be the power controller. Listed in switchbrew under the category PTM services.
* text_formatter: Avoid unnecessary string temporary creation in PrintMessage()Gravatar 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.
* Stubbed IRS (#1349)Gravatar David2018-09-232-0/+2
| | | | | | | | | | * Stubbed IRS Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly. * Added IRS to logging backend * Forward declared shared memory for irs
* Port #4182 from Citra: "Prefix all size_t with std::"Gravatar fearlessTobi2018-09-154-5/+6
|
* common/logging: Amend documentation commentsGravatar Lioncash2018-09-042-6/+6
| | | | | | | Multi-line doc comments still need the '<' after the ///, otherwise it's treated as a regular comment and makes the original doc comment broken in viewers, IDEs, etc. While we're at it, also fix some typos in the comments.
* common/logging/filter: Replace C-style case with C++ static_castGravatar Lioncash2018-09-041-1/+1
|
* common/logging/filter: Make constructor explicitGravatar Lioncash2018-09-041-1/+1
| | | | Implicit conversions aren't desirable here.
* logging/text_formatter: Use empty braces for initializing ↵Gravatar 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/backend: Use const reference to refer to log filterGravatar Lioncash2018-08-131-2/+3
| | | | | | The filter is returned via const reference, so this was making a pointless copy of the entire filter every time a message was being pushed into the logger instance.
* common/logging: Add missing service log categoriesGravatar Lioncash2018-08-082-0/+16
| | | | These weren't added when the services were introduced.
* service: Add usb servicesGravatar Lioncash2018-08-072-0/+2
| | | | Adds basic skeleton for the usb services based off the information provided by Switch Brew.