You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When configuring log using the UseLogging, nothing appears in log on Android
Expected behavior
Logs
How to reproduce it (as minimally and precisely as possible)
Create a an app using the ""recommended"" settings
Configure log to trace (e.g. configure HR to trace)
Launch the app on Android
Observe nothing is outputted in logs from uno
Environment
Package Version(s): 5.7
[?] iOS
[?] macOS (AppKit)
[?] Mac Catalyst
Android
[?] WebAssembly
[?] Windows
[?] Skia (WPF)
[?] Skia (GTK on Linux/macOS/Windows)
[?] Skia (Linux Framebuffer)
Build tasks
Workaround
Configure logging using the code from a blank app:
staticApplication(){App.InitializeLogging();}
/// <summary>/// Configures global Uno Platform logging/// </summary>publicstaticvoidInitializeLogging(){
#if DEBUG// Logging is disabled by default for release builds, as it incurs a significant// initialization cost from Microsoft.Extensions.Logging setup. If startup performance// is a concern for your application, keep this disabled. If you're running on the web or// desktop targets, you can use URL or command line parameters to enable it.//// For more performance documentation: https://platform.uno/docs/articles/Uno-UI-Performance.htmlvarfactory=LoggerFactory.Create(builder =>{
#if __WASM__builder.AddProvider(newglobal::Uno.Extensions.Logging.WebAssembly.WebAssemblyConsoleLoggerProvider());
#elif __IOS__||__MACCATALYST__builder.AddProvider(newglobal::Uno.Extensions.Logging.OSLogLoggerProvider());
#else
builder.AddConsole();
#endif
// Exclude logs below this levelbuilder.SetMinimumLevel(LogLevel.Information);// Default filters for Uno Platform namespacesbuilder.AddFilter("Uno",LogLevel.Warning);builder.AddFilter("Windows",LogLevel.Warning);builder.AddFilter("Microsoft",LogLevel.Warning);// Generic Xaml events// builder.AddFilter("Microsoft.UI.Xaml", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.VisualStateGroup", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.StateTriggerBase", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.UIElement", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.FrameworkElement", LogLevel.Trace );// Layouter specific messages// builder.AddFilter("Microsoft.UI.Xaml.Controls", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.Controls.Layouter", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.Controls.Panel", LogLevel.Debug );// builder.AddFilter("Windows.Storage", LogLevel.Debug );// Binding related messages// builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug );// builder.AddFilter("Microsoft.UI.Xaml.Data", LogLevel.Debug );// Binder memory references tracking// builder.AddFilter("Uno.UI.DataBinding.BinderReferenceHolder", LogLevel.Debug );// DevServer and HotReload related// builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Information);// Debug JS interop// builder.AddFilter("Uno.Foundation.WebAssemblyRuntime", LogLevel.Debug );});global::Uno.Extensions.LogExtensionPoint.AmbientLoggerFactory=factory;
#if HAS_UNOglobal::Uno.UI.Adapter.Microsoft.Extensions.Logging.LoggingAdapter.Initialize();
#endif
#endif
}
The text was updated successfully, but these errors were encountered:
Current behavior
When configuring log using the
UseLogging
, nothing appears in log on AndroidExpected behavior
Logs
How to reproduce it (as minimally and precisely as possible)
Environment
Package Version(s): 5.7
Workaround
Configure logging using the code from a blank app:
The text was updated successfully, but these errors were encountered: