#logging-framework #logging #wasm-framework #framework #log #bpf #console-log

workflow-log

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

38 releases (16 breaking)

0.18.0 Sep 7, 2024
0.16.0 Aug 19, 2024
0.15.0 Jul 26, 2024
0.11.0 Feb 25, 2024
0.1.0 Sep 21, 2022

#115 in Command-line interface

Download history 713/week @ 2024-09-25 571/week @ 2024-10-02 562/week @ 2024-10-09 711/week @ 2024-10-16 674/week @ 2024-10-23 525/week @ 2024-10-30 385/week @ 2024-11-06 882/week @ 2024-11-13 494/week @ 2024-11-20 527/week @ 2024-11-27 688/week @ 2024-12-04 467/week @ 2024-12-11 342/week @ 2024-12-18 167/week @ 2024-12-25 409/week @ 2025-01-01 367/week @ 2025-01-08

1,331 downloads per month
Used in 71 crates (36 directly)

MIT/Apache

33KB
697 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_warn!()
  • log_error!()

Dependencies

~0–7MB
~42K SLoC