Skip to content

Commit

Permalink
Merge branch 'release/1.3.0-alpha.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
nekofar committed Jan 24, 2025
2 parents 9861789 + 1c43c3d commit 00a0f57
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 22 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [1.3.0-alpha.13] - 2025-01-24

### Refactor

- Replace `worker_logger` with `tracing_subscriber`

## [1.3.0-alpha.12] - 2025-01-23

### Miscellaneous Tasks
Expand Down
122 changes: 105 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lilnouns-bots"
version = "1.3.0-alpha.12"
version = "1.3.0-alpha.13"
authors = ["Milad Nekofar <milad@nekofar.com>"]
edition = "2021"
description = "Our bots are designed to keep the Lil Nouns DAO community informed and engaged."
Expand Down Expand Up @@ -36,9 +36,11 @@ regex = "1.11.1"
reqwest = "0.11.27"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.137"
time = "0.3.37"
worker = "0.5.0"
worker_logger = { git = "https://github.com/nekofar/worker_logger.git", tag = "v1.0.0-alpha.0" }
tracing = "0.1"
tracing-web = "0.1"
tracing-subscriber = { version = "0.3", features = ['time', 'json'] }
time = { version = "0.3", features = ['wasm-bindgen'] }

[profile.release]
lto = true
Expand Down
20 changes: 18 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
use log::{error, info, Level};

Check warning on line 1 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unused import: `Level`

Check warning on line 1 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unused import: `Level`
use tracing_subscriber::{
fmt::{format::Pretty, time::UtcTime},
prelude::*,
};
use tracing_web::{performance_layer, MakeConsoleWriter, MakeWebConsoleWriter};

Check warning on line 6 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unused import: `MakeWebConsoleWriter`

Check warning on line 6 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unused import: `MakeWebConsoleWriter`
use worker::{event, Env, Result, ScheduleContext, ScheduledEvent};

use crate::{
Expand Down Expand Up @@ -78,9 +83,20 @@ async fn start(event: &ScheduledEvent, env: &Env) -> Result<()> {
}

#[event(start)]

Check warning on line 85 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`

Check warning on line 85 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
pub fn start() {
worker_logger::init_with_level(&Level::Debug);
fn start() {
utils::set_panic_hook();

let fmt_layer = tracing_subscriber::fmt::layer()
.json()
.with_ansi(false) // Only partially supported across JavaScript runtimes
.with_timer(UtcTime::rfc_3339()) // std::time is not available in browsers
.with_writer(MakeConsoleWriter); // write events to the console

let perf_layer = performance_layer().with_details_from_fields(Pretty::default());
tracing_subscriber::registry()
.with(fmt_layer)
.with(perf_layer)
.init();
}

#[event(scheduled)]

Check warning on line 102 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`

Check warning on line 102 in src/lib.rs

View workflow job for this annotation

GitHub Actions / Build & Test

unexpected `cfg` condition name: `wasm_bindgen_unstable_test_coverage`
Expand Down

0 comments on commit 00a0f57

Please sign in to comment.