Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6d0521d
first release
Firesz25 May 24, 2025
3e1f33e
add license file and author
Firesz25 May 24, 2025
666bec6
fix gh actions
Firesz25 May 24, 2025
e2dc521
fix code formater
Firesz25 May 24, 2025
86bc4b2
rewrite code formater gh actions
Firesz25 May 24, 2025
305ff20
fix: some function conver time to utc when its is use only to test in…
Firesz25 May 24, 2025
59a0478
add readme and expand example
Firesz25 May 29, 2025
ccf0b63
add mising image for readme
Firesz25 May 29, 2025
678d00a
remove formater config
Firesz25 May 29, 2025
5f91597
change how propagator spawn a new thead and simplify it
Firesz25 May 29, 2025
1505003
ci: add missing cache
Firesz25 Jun 4, 2025
bc3c65c
ci: rewrite build and test to run on common os and all toolchain
Firesz25 Jun 4, 2025
9a846e3
ci: add test for previous commit
Firesz25 Jun 4, 2025
4a0ea5f
ci: add automatic publication to crates.io
Firesz25 Jun 4, 2025
bc51638
ci: add workflow to check the publisched wersion is work
Firesz25 Jun 4, 2025
f84df94
ci: some cosmetic changes
Firesz25 Jun 4, 2025
b4e23e8
Update after-pub.yml
Firesz25 Jun 4, 2025
4516a4b
feat: first release
Firesz25 Jun 4, 2025
6a7df2f
docs: update readme to get api key from config and example
Firesz25 Jun 5, 2025
373282e
docs: update readme to prowe how to use api key from user
Firesz25 Jun 5, 2025
205ba45
ci: remove testing build on beta and nightly
Firesz25 Jun 5, 2025
e109c35
fix: verbose cfg not work
Firesz25 Jun 5, 2025
7b62a58
docs: example now use verbose to print send log to terminal
Firesz25 Jun 5, 2025
082b566
fix: language issue
Firesz25 Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/after-pub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check deployed package

on:
workflow_dispatch:
workflow_run:
workflows: ["Release-plz"]
types:
- completed
branches:
- main

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

jobs:
run-after-pub:
name: Run LogDash after publish check
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Wait for crates.io to update
run: sleep 60
- name: Create temp project and test
env:
LOGDASH_API_KEY: ${{ secrets.LOGDASH_API_KEY }}
run: |
cargo new temp-test
cd temp-test
cargo add logdash
echo 'fn main() { rs   18:39
// Create a new Logdash client with default configuration
let (l, m) = logdash::create_logdash(logdash::Config::default());

// Send an info log message
l.info("Rust SDK example");

// Send a metric message
m.set("user".into(), 0.0);

// Sleep for 10 seconds to allow the log message to be sent
// This is just for demonstration purposes
// In a real application, you would not want to sleep the thread like this
std::thread::sleep(std::time::Duration::from_secs(10));
}' > src/main.rs
cargo run
cargo test
24 changes: 24 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Security Audit

on:
push:
branches:
- master
paths:
- "**/Cargo.toml"
schedule:
- cron: "0 2 * * *" # run at 2 AM UTC

permissions:
contents: read

jobs:
cargo-deny:
permissions:
checks: write
contents: read
issues: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

permissions:
contents: read

jobs:
build-all:
name: build all toolchain and OS
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
- name: "install Rust Stable"
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: build
run: cargo build
- name: test
run: cargo test

fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
# Check fmt
- name: "cargo fmt"
run: cargo fmt --all -- --check

clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# Run clippy
- name: "clippy --all"
run: cargo clippy --all --tests --no-deps
58 changes: 58 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

jobs:
# Release unpublished packages.
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

# Create a PR with the new versions and changelog, preparing the next release.
release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: release-plz/action@v0.5
with:
command: release-pr
config: release-plz.toml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading