com.unity.logging 1.0.0-exp.6
Notes: processedReleased September 27, 2022
Unity Compatibility
Minimum Unity: 2022.2 (0b5)
Package Dependencies
✨ Features
- Stacktrace support. .net core and ns20 have much faster stack traces.
- AggressiveInlining attributes
- Il2CppSetOption attributes with disabled runtime checks for perf critical code
- Public way to create a LoggerHandle in case it cannot be used directly
- Support of UNITY\_DOTS\_DEBUG define
- Sync logging
- Support for strings in logging calls
- SourceGenerator's speed by detecting compilation abort better
- Ability to log properties
- LogWithName attribute added
- NotLogged / NonSerialized attribute added
- Static analyzer for Log. messages that validates the message and arguments.
- Default Logger is created if a user didn't do that
- Logging system will call update automatically, using PlayerLoop
- Logging will flush and cleanup on application quit
- SelfLog error on empty template for text logging
📈 Improvements
- USE\_BASELIB define removed to work with all Unity Editors
- minor `in` -> `ref` replace for the messages in the queue
- in -> ref in few places
- Burst 1.6.4 used
- T constraint on `Builder.BuildContext` from `struct` to `unmanaged`.
- Logging's source generators are not emitting warnings on not burst compatible calls anymore
- Default and max buffer capacity reduced
- Log writing to files now has log rolling enabled by default, with a maximum log file size of 5MB and 15 maximum log files that can exist before older log files are deleted as the logger rolls to a new one.
- Added composite formatting and a subset of format specifiers to logging statements for integer types. Standard numeric format specifiers included are `DdXx`, custom numeric format specifiers are `0#,.\` and string literals enclosed by `''` or `""`.
- SourceGenerator's code refactoring.
- Log.\* calls are generated even if no usage is detected to improve auto-completion
- Mirror structs are not visible to users anymore
- Formatter's architecture that gives the ability to provide custom formatters for user types
- FlushAll is called on Logger's Dispose
- ### Deprecated
⚡ API Changes
- Unity.Mathematics dependency from Logging logic removed
- MTT-1916 reverted (Align mem allocations to 8 bytes)
- Dead code and asmrefs removed
- No need to enable 'unsafe' code to use the package.
- SourceGenerator's code to access file system removed as not used.
- Dead code removed
🔧 Bug Fixes
- Arm64 crash fix
- DisableDirectCall Burst issue that was fixed in 1.6
- Dots Runtime compilation fixes
- Rare race condition fixed
- SetMinimalLogLevelAcrossAllSinks not updating m\_MinimalLogLevelAcrossAllSinks fixed
- Lock when trying to log using invalid logging handle.
- Version define in asmdef's changed to comply with Rider IDE requirements
- Timestamp stability improved
- Bug with package detection code, now we generate Log.\* code always
- SharedStatic alignment added to fix the crash on ARM
- Omitted message near non-omitted one cause wrong codegen
- Reserved argument names parsed incorrectly
- Crash in some cases when a user calls Log. from non-main thread first (so cctor is called on non-main thread)
- HideInStacktrace now works for burst's directcalls
