Skip to content

Commit

Permalink
rename ezlog-cli to ezlogcli
Browse files Browse the repository at this point in the history
  • Loading branch information
s1rius committed Oct 14, 2023
1 parent 662ac53 commit c7259b7
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-03-07
toolchain: nightly-2023-10-13
components: ${{ matrix.components }}
- name: Install android target
if: ${{ runner.os == 'Linux' }}
Expand All @@ -45,15 +45,15 @@ jobs:
- name: Add Linux rust std
if: ${{ runner.os == 'Linux' }}
run: >
rustup component add rust-src --toolchain nightly-2023-03-07-x86_64-unknown-linux-gnu
rustup component add rust-src --toolchain nightly-2023-10-13-x86_64-unknown-linux-gnu
- name: Add macOS rust std
if: ${{ runner.os == 'macOS' }}
run: >
rustup component add rust-src --toolchain nightly-2023-03-07-x86_64-apple-darwin
rustup component add rust-src --toolchain nightly-2023-10-13-x86_64-apple-darwin
- name: Build & Test - ezlog All Features
run: cargo test --manifest-path ./ezlog-core/Cargo.toml --verbose --all-features --no-fail-fast
- name: Build & Test - ezlog_cli
run: cargo test --manifest-path ./ezlog-cli/Cargo.toml --verbose --no-default-features --no-fail-fast
run: cargo test --manifest-path ./ezlogcli/Cargo.toml --verbose --no-default-features --no-fail-fast
- name: Install Android NDK
if: ${{ runner.os == 'Linux' }}
uses: nttld/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
components: rustfmt, clippy
- name: Publish ezlog on crates.io
run: cargo +nightly publish --package ezlog --token ${CRATES_TOKEN}
- name: Publish ezlog-cli on crates.io
run: cargo +nightly publish --package ezlog-cli --token ${CRATES_TOKEN}
- name: Publish ezlogcli on crates.io
run: cargo +nightly publish --package ezlogcli --token ${CRATES_TOKEN}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[workspace]
members = ["ezlog-cli", "ezlog-core", "examples/android_preview", "examples/nest_log"]
members = ["ezlogcli", "ezlog-core", "examples/android_preview", "examples/nest_log"]

# https://github.com/johnthagen/min-sized-rust
[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ see more examples in examples dir.
│   └── lib-ezlog # ezlog android library
├── examples # Rust examples
├── ezlog_flutter # Flutter plugin
├── ezlog-cli # Rust command line tool
├── ezlogcli # Rust command line tool
├── ezlog-core # Rust core library
├── ios
│   ├── EZLog # ezlog iOS library
Expand Down
2 changes: 1 addition & 1 deletion docs/JOURNAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Starting: Intent { act=android.intent.action.MAIN cmp=rust.ezlog_android_preview
│   ├── app # android 示例工程
│   └── lib-ezlog # EZLog android 库
├── examples # rust 示例
├── ezlog-cli # 命令行工具
├── ezlogcli # 命令行工具
├── ezlog-core # 核心库
├── ios
│   ├── EZLog # EZLog iOS 库
Expand Down
2 changes: 1 addition & 1 deletion docs/po/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ msgid ""
"│   └── lib-ezlog # ezlog android library\n"
"├── examples # Rust examples\n"
"├── ezlog_flutter # Flutter plugin\n"
"├── ezlog-cli # Rust command line tool\n"
"├── ezlogcli # Rust command line tool\n"
"├── ezlog-core # Rust core library\n"
"├── ios\n"
"│   ├── EZLog # ezlog iOS library\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/po/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ msgid ""
"│   └── lib-ezlog # ezlog android library\n"
"├── examples # Rust examples\n"
"├── ezlog_flutter # Flutter plugin\n"
"├── ezlog-cli # Rust command line tool\n"
"├── ezlogcli # Rust command line tool\n"
"├── ezlog-core # Rust core library\n"
"├── ios\n"
"│   ├── EZLog # ezlog iOS library\n"
Expand Down
2 changes: 1 addition & 1 deletion docs/src/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
│   └── lib-ezlog # ezlog android library
├── examples # Rust examples
├── ezlog_flutter # Flutter plugin
├── ezlog-cli # Rust command line tool
├── ezlogcli # Rust command line tool
├── ezlog-core # Rust core library
├── ios
│   ├── EZLog # ezlog iOS library
Expand Down
4 changes: 2 additions & 2 deletions ezlog-core/src/init.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{ptr, sync::Arc};
use std::ptr;

use crate::{
EZLogCallback, EZMsg, EZRecord, EventListener, EventPrinter, Formatter, LogService,
Expand Down Expand Up @@ -226,7 +226,7 @@ impl InitBuilder {
crate::set_boxed_formatter(formatter);
}
let mut service = LogService::new();
service.layers = Arc::new(self.layers);
service.layers = self.layers;
ptr::write(crate::LOG_SERVICE.as_mut_ptr(), service);
});
EZLog {}
Expand Down
5 changes: 2 additions & 3 deletions ezlog-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ use time::OffsetDateTime;

use std::error::Error;
use std::path::PathBuf;
use std::sync::Arc;
use std::{
collections::HashMap,
hash::Hash,
Expand Down Expand Up @@ -178,7 +177,7 @@ pub fn init_with_event(event: &'static dyn EventListener) {
}

struct LogService {
layers: Arc<Vec<Box<dyn MsgHandler>>>,
layers: Vec<Box<dyn MsgHandler>>,
loggers: HashMap<String, EZLogger>,
log_sender: Sender<EZMsg>,
fetch_sender: Sender<FetchResult>,
Expand All @@ -187,7 +186,7 @@ struct LogService {
impl LogService {
fn new() -> Self {
LogService {
layers: Arc::new(Vec::new()),
layers: Vec::new(),
loggers: HashMap::new(),
log_sender: init_log_channel(),
fetch_sender: init_callback_channel(),
Expand Down
2 changes: 1 addition & 1 deletion ezlog-cli/Cargo.toml → ezlogcli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ezlog-cli"
name = "ezlogcli"
version = "0.2.0-beta.4"
edition = "2021"
description = "EZLog command line tool"
Expand Down
2 changes: 1 addition & 1 deletion ezlog-cli/README.md → ezlogcli/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# EZLog command line tool

```
Usage: ezlog-cli [OPTIONS]
Usage: ezlogcli [OPTIONS]
Options:
-i, --input <FILE>
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ezlog-cli/src/main.rs → ezlogcli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ mod tests {
#[test]
fn test_help() {
escargot::CargoBuild::new()
.bin("ezlog-cli")
.bin("ezlogcli")
.current_release()
.current_target()
.run()
Expand All @@ -172,7 +172,7 @@ mod tests {
#[test]
fn test_decode() {
let bin_under_test = escargot::CargoBuild::new()
.bin("ezlog-cli")
.bin("ezlogcli")
.current_release()
.current_target()
.run()
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-03-07
nightly-2023-10-13

0 comments on commit c7259b7

Please sign in to comment.