flowsnet-platform-sdk

Crates.ioflowsnet-platform-sdk
lib.rsflowsnet-platform-sdk
version0.1.6
sourcesrc
created_at2023-02-14 03:58:59.88295
updated_at2023-10-09 05:50:26.404814
descriptionPlatform SDK for flows.network
homepage
repository
max_upload_size
id784569
size4,211
DarumaDocker!! (DarumaDocker)

documentation

https://docs.rs/flowsnet-platform-sdk

README

This is a rust logging implementation for flows.network.

Usage example

use slack_flows::{listen_to_channel, send_message_to_channel};
use flowsnet_platform_sdk::logger;

#[no_mangle]
pub fn run() {
    logger::init();
    listen_to_channel("myworkspace", "mychannel", |sm| {
        log::info!("Message received");
        send_message_to_channel("myworkspace", "mychannel", format!("Hello, {}", sm.text))
    }).await;
}

Logging is controlled via the RUST_LOG environment variable. It can be set in the 'Setting' tab in your flow's page. Values should be one of the log levels, they are error, warn, info, debug, trace. For the above example, it should be set to info, debug or trace to make the message be printed. Without RUST_LOG being set, only the error log will be printed. You can see the messages in the 'Running log' tab in you flow's page.

The whole document is here.

Commit count: 0

cargo fmt