summaryrefslogtreecommitdiffstats
path: root/core/io/logger.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Remove confusing USER prefix from script-logged errorsSébastien Dunne Fulmer2024-08-271-5/+1
|
* Fix UTF-8 misintepreted as Latin-1 when logging to fileAlvin Wong2024-07-071-1/+1
|
* Strip ANSI escape codes from file loggingHugo Locurcio2024-04-241-0/+16
| | | | | | | | | | Text editors cannot display ANSI escape codes, so these should be stripped from log files to ensure readability. Since this uses a regex, this works both for `print_rich()` and manually inserted ANSI escape codes. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
* Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-1/+1
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Logger: Don't print error twice on `ERR_PRINT`Rémi Verschelde2022-10-041-1/+1
| | | | | | | Also fix broken `ERR_PRINT_ED` macro and simplify comments. For the record these macros aren't used yet, they're intended to be used where needed to surface messages in the toaster when useful to end users, but we haven't done that codebase review yet.
* Variant memory poolslawnjelly2022-07-041-1/+2
| | | | Memory pools via PagedAllocator for Transform2D, Transform3D, Basis and AABB.
* Fix typos with codespellRémi Verschelde2022-05-231-1/+1
| | | | Using codespell 2.2-dev from current git.
* Add a new HashSet templatereduz2022-05-201-4/+4
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-161-2/+2
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Narrow FileAccess scope to prevent deadlocks.bruvzg2022-04-121-1/+1
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-19/+9
|
* Convert uses of `DirAccess *` to `DirAccessRef` to prevent memleaksRémi Verschelde2022-03-111-7/+3
| | | | | | | | `DirAccess *` needs to be deleted manually, and this is often forgotten especially when doing early returns with `ERR_FAIL_COND`. `DirAccessRef` is deleted automatically when it goes out of scope. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-2/+2
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Fix console colors on WindowsYuri Roubinsky2021-11-261-1/+1
|
* Implement toast notifications in the editorGilles Roudière2021-10-141-3/+7
|
* Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde2021-06-121-5/+2
|\ | | | | Add a Time singleton
| * Add Time singletonAaron Franke2021-06-111-5/+2
| |
* | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
|/ | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Logger: Cache 'flush_stdout_on_print' to improve performance, and works ↵Mateo Kuruk Miccino2021-02-281-2/+8
| | | | | | before ProjectSettings starts. ProjectSetting: Now 'application/run/flush_stdout_on_print' requires a restart of the Editor to take effect
* Fixes crash when exiting with --verbose with leaked resourcesGilles Roudière2021-02-091-2/+2
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Add a project setting to enable stdout flushing in release buildsHugo Locurcio2020-12-151-9/+11
| | | | This can be used in server builds for journalctl compatibility.
* Tweak log file names for consistency between Mono and non-Mono logsHugo Locurcio2020-12-061-1/+1
| | | | | | - Avoid spaces in Mono log file names. - Use a `.log` extension for Mono logs, just like non-Mono logs. - Use periods to separate hours/minutes/seconds for non-Mono logs.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Enable file logging by default on desktops to help with troubleshootingHugo Locurcio2020-07-081-1/+1
| | | | | | | | | | | - Use the `.log` file extension (recognized on Windows out of the box) to better hint that generated files are logs. Some editors provide dedicated syntax highlighting for those files. - Use an underscore to separate the basename from the date and the date from the time in log filenames. This makes the filename easier to read. - Keep only 5 log files by default to decrease disk usage in case messages are spammed.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-2/+3
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-6/+1
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-5/+15
| | | | Part of #33027.
* Remove some C++11 polyfill defines that are no longer neededHugo Locurcio2020-05-031-11/+0
|
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|
* Improve the console error logging appearanceHugo Locurcio2020-01-191-6/+6
| | | | | | | This makes secondary information less visually prominent to improve overall readability. Various loggers were also tweaked for consistency.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Fix parameterised macros in core. Addresses #25488IronicallySerious2019-02-181-1/+1
| | | | | | This adds the saves the programmer of doing something like SWAP(x++, y--) and getting the wrong result unless the parameters are evaluated before use.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Moved member variables to initializer listWilson E. Alvarez2018-12-111-7/+6
|
* Fixing warnings generated by MSVCDualtagh Murray2018-10-191-0/+4
| | | | Fixes #22684.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-3/+3
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Fixed regression making the logger not respect the max files limit.Michael Alexsander Silva Dias2018-06-121-2/+2
|
* Don't add a period to a log file name if it has no extension.Michael Alexsander Silva Dias2018-05-301-1/+4
|
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Return and repair file loggingRuslan Mustakov2017-11-211-0/+5
| | | | And make it configurable, too.
* Fix rotated logger naming and backup deletionRuslan Mustakov2017-10-201-3/+3
|
* Define va_copy with --std=c++03 (fixes #11979)Ruslan Mustakov2017-10-101-0/+11
|
* Fix logging of long strings via RotatedFileLoggerRuslan Mustakov2017-10-051-1/+4
|
* Extract logging logicRuslan Mustakov2017-09-251-0/+252
Previously logging logic was scattered over OS class implementations with plenty of duplication. Major changes in this commit: - Extracted logging logic into a separate Logger hierarchy. It allows easy configuration of logging mechanism depending on compile-time or run-time configuration. - Implemented RotatedFileLogger which is usually used with StdLogger, providing persistency of logs. It is often important to be able to obtain logs of the game even in production to be able to understand what happened prior to some problem. On mobile there previously was no way to obtain the logs aside from having the device connected to your machine. - flush() is not performed in release mode for every logged line. It is only performed for errors.