Skip to content

feat: add tracing support and update dependencies in Cargo.toml#27

Open
davehorner wants to merge 1 commit intoallenbenz:mainfrom
davehorner:main
Open

feat: add tracing support and update dependencies in Cargo.toml#27
davehorner wants to merge 1 commit intoallenbenz:mainfrom
davehorner:main

Conversation

@davehorner
Copy link
Copy Markdown

  • Added tracing-subscriber and tracing dependencies for enhanced logging
  • Integrated tracing initialization in multiple example files (image.rs, reuse_arguments.rs, reuse_toast.rs, simple.rs, without_library.rs)
    • Updated examples to use the new tracing functionality for better debugging and logging
      • Revised related documentation in lib.rs for clarity on tracing usage

@davehorner
Copy link
Copy Markdown
Author

Crate: windows
Version: 0.24.0
Warning: unsound
Title: Delegate functions are missing Send bound
Date: 2022-01-02
ID: RUSTSEC-2022-0008
URL: https://rustsec.org/advisories/RUSTSEC-2022-0008
Dependency tree:
windows 0.24.0
└── winrt-notification 0.5.1

warning: 1 allowed warning found

@davehorner
Copy link
Copy Markdown
Author

C:\w\rust\winrt-notification>cargo e -t
history
Running example: cargo run --release --example image
Process started. Press Ctrl+C to terminate or 'd' to detach...
   Compiling winrt-notification v0.5.1 (C:\w\rust\winrt-notification)
    Finished `release` profile [optimized] target(s) in 2.59s
     Running `target\release\examples\image.exe`
2025-03-12T01:00:20.622320Z TRACE winrt_notification: Added hero image from "C:\\absolute\\path\\to\\image.jpeg"
2025-03-12T01:00:20.622546Z TRACE winrt_notification: Added icon with crop Circular from "c:/this/style/works/too/image.png"
2025-03-12T01:00:20.622687Z TRACE winrt_notification: Set title: Lots of pictures here
2025-03-12T01:00:20.622912Z TRACE winrt_notification: Set text1: One above the text as the hero
2025-03-12T01:00:20.623077Z TRACE winrt_notification: Set text2: One to the left as an icon, and several below
2025-03-12T01:00:20.623227Z TRACE winrt_notification: Added image from "c:/photos/sun.png"
2025-03-12T01:00:20.623379Z TRACE winrt_notification: Added image from "c:/photos/moon.png"
2025-03-12T01:00:20.623514Z TRACE winrt_notification: Set sound: None
2025-03-12T01:00:20.623641Z TRACE winrt_notification: Attempting to create and show toast
2025-03-12T01:00:20.623769Z TRACE winrt_notification: Creating XML template for the toast
2025-03-12T01:00:20.628828Z TRACE winrt_notification: Toast XML: <toast  >
                    <visual>
                        <binding template="ToastGeneric">
                        <image placement="Hero" src="file:///C:\absolute\path\to\image.jpeg" alt="alt text" /><image placement="appLogoOverride" hint-crop="circle" src="file:///c:/this/style/works/too/image.png" alt="alt text" /><image id="1" src="file:///c:/photos/sun.png" alt="the sun" /><image id="1" src="file:///c:/photos/moon.png" alt="the moon" /><text id="1">Lots of pictures here</text><text id="2">One above the text as the hero</text><text id="3">One to the left as an icon, and several below</text>
                        </binding>
                    </visual>
                    <audio silent="true" />
                </toast>
2025-03-12T01:00:20.654263Z TRACE winrt_notification: Toast template created successfully
2025-03-12T01:00:20.681605Z TRACE winrt_notification: Toast shown, result: Ok(())
Process exited with status: 0

- Added tracing-subscriber and tracing dependencies for enhanced logging
- Integrated tracing initialization in multiple example files (image.rs,
  reuse_arguments.rs, reuse_toast.rs, simple.rs, without_library.rs)
- Revised related documentation in lib.rs for clarity on tracing usage
- HORNERs Quality checks (fmt,fix,audit) [davehorner](https://github.com/davehorner)
@davehorner
Copy link
Copy Markdown
Author

The library works fine. I had my JetKVM connected and apparently it only shows on one monitor. Is there a way to have them displayed on all? if not via the windows api, a flag and addressing which window has the notification? idk if you can address monitors or not. anyway the app is not exiting silently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant