#wasm #framework #log #logger #bpf

workflow-log

Log macros & utilities abstracting native & in-browser logging interfaces

18 releases (6 breaking)

new 0.7.0 Sep 20, 2023
0.5.4 Aug 19, 2023
0.3.17 May 28, 2023
0.3.12 Mar 11, 2023
0.1.0 Sep 21, 2022

#188 in WebSocket

Download history 340/week @ 2023-05-31 306/week @ 2023-06-07 340/week @ 2023-06-14 480/week @ 2023-06-21 304/week @ 2023-06-28 325/week @ 2023-07-05 349/week @ 2023-07-12 432/week @ 2023-07-19 243/week @ 2023-07-26 233/week @ 2023-08-02 306/week @ 2023-08-09 695/week @ 2023-08-16 321/week @ 2023-08-23 199/week @ 2023-08-30 350/week @ 2023-09-06 182/week @ 2023-09-13

1,098 downloads per month
Used in 47 crates (21 directly)

MIT/Apache

32KB
668 lines

workflow-log

Part of the workflow-rs application framework.


Application logging functionality

github crates.io docs.rs license

Features

  • Log output functions that functions uniformly on supported platforms.
    • Native uses stdout
    • WASM (browser) uses console.log() and similar functions.
    • Solana OS (BPF) uses solana_program::log::sol_log() (same as msg!() macro)
  • Attach to the standard log crate.
  • Register a custom log sink to consume all application output externally.
  • Re-export and a custom bypass for console crate, allowing to use ANSI terminal features while discarding them when running under BPF.

This crate offers the following macros:

  • log_trace!()
  • log_debug!()
  • log_info!()
  • log_warning!()
  • log_error!()

Dependencies

~0–15MB
~148K SLoC