Skip to content

Commit

Permalink
no log file for tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
bestia.dev committed Apr 19, 2024
1 parent 78552f1 commit 0e17558
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 40 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-auto"
version = "2024.419.1816"
version = "2024.419.1824"
authors = ["bestia.dev"]
homepage = "https://bestia.dev"
edition = "2021"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[//]: # (auto_cargo_toml_to_md start)

**Automation tasks coded in Rust language for the workflow of Rust projects**
***version: 2024.419.1816 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
***version: 2024.419.1824 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***

![maintained](https://img.shields.io/badge/maintained-green)
![ready-for-use](https://img.shields.io/badge/ready_for_use-green)
Expand All @@ -28,9 +28,9 @@
![cargo-auto](https://bestia.dev/webpage_hit_counter/get_svg_image/959103982.svg)

[//]: # (auto_lines_of_code start)
[![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3114-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
[![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3106-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
[![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-1191-blue.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
[![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-687-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
[![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-699-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
[![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
[![Lines in tests](https://img.shields.io/badge/Lines_in_tests-10704-orange.svg)](https://github.com/automation-tasks-rs/cargo-auto/)

Expand Down
2 changes: 2 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The TODO section is part of the [README.md](https://github.com/automation-tasks-

## Unreleased

- no log file for tracing

## Version 2024.419.1816 (2024-04-19)

- 1.1.2
Expand Down
5 changes: 3 additions & 2 deletions automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");

let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -63,7 +64,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down
Empty file.
6 changes: 3 additions & 3 deletions src/bin/cargo-auto/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! # cargo-auto
//!
//! **Automation tasks coded in Rust language for the workflow of Rust projects**
//! ***version: 2024.419.1816 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//! ***version: 2024.419.1824 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//!
//! ![maintained](https://img.shields.io/badge/maintained-green)
//! ![ready-for-use](https://img.shields.io/badge/ready_for_use-green)
Expand All @@ -26,9 +26,9 @@
//! [![Newest docs](https://img.shields.io/badge/newest_docs-blue.svg)](https://automation-tasks-rs.github.io/cargo-auto/cargo_auto/index.html)
//! ![cargo-auto](https://bestia.dev/webpage_hit_counter/get_svg_image/959103982.svg)
//!
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3114-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3106-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-1191-blue.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-687-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-699-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in tests](https://img.shields.io/badge/Lines_in_tests-10704-orange.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//!
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! # cargo-auto
//!
//! **Automation tasks coded in Rust language for the workflow of Rust projects**
//! ***version: 2024.419.1816 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//! ***version: 2024.419.1824 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//!
//! ![maintained](https://img.shields.io/badge/maintained-green)
//! ![ready-for-use](https://img.shields.io/badge/ready_for_use-green)
Expand All @@ -26,9 +26,9 @@
//! [![Newest docs](https://img.shields.io/badge/newest_docs-blue.svg)](https://automation-tasks-rs.github.io/cargo-auto/cargo_auto/index.html)
//! ![cargo-auto](https://bestia.dev/webpage_hit_counter/get_svg_image/959103982.svg)
//!
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3114-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3106-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-1191-blue.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-687-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-699-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in tests](https://img.shields.io/badge/Lines_in_tests-10704-orange.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//!
Expand Down
5 changes: 3 additions & 2 deletions src/template_new_auto_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -148,7 +149,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down
11 changes: 6 additions & 5 deletions src/template_new_cli_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -159,7 +160,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down Expand Up @@ -1360,7 +1361,7 @@ fn upper_greet_name(greet_name: &str) -> anyhow::Result<()> {
//! # cargo-auto
//!
//! **Automation tasks coded in Rust language for the workflow of Rust projects**
//! ***version: 2024.419.1816 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//! ***version: 2024.419.1824 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//!
//! ![maintained](https://img.shields.io/badge/maintained-green)
//! ![ready-for-use](https://img.shields.io/badge/ready_for_use-green)
Expand All @@ -1380,9 +1381,9 @@ fn upper_greet_name(greet_name: &str) -> anyhow::Result<()> {
//! [![Newest docs](https://img.shields.io/badge/newest_docs-blue.svg)](https://automation-tasks-rs.github.io/cargo-auto/cargo_auto/index.html)
//! ![cargo-auto](https://bestia.dev/webpage_hit_counter/get_svg_image/959103982.svg)
//!
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3114-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3106-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-1191-blue.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-687-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-699-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in tests](https://img.shields.io/badge/Lines_in_tests-10704-orange.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//!
Expand Down
13 changes: 7 additions & 6 deletions src/template_new_pwa_wasm_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");

let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -344,7 +345,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down Expand Up @@ -2010,7 +2011,7 @@ pub const RESET: &str = "\x1b[0m";
//! # cargo-auto
//!
//! **Automation tasks coded in Rust language for the workflow of Rust projects**
//! ***version: 2024.419.1816 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//! ***version: 2024.419.1824 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//!
//! ![maintained](https://img.shields.io/badge/maintained-green)
//! ![ready-for-use](https://img.shields.io/badge/ready_for_use-green)
Expand All @@ -2030,9 +2031,9 @@ pub const RESET: &str = "\x1b[0m";
//! [![Newest docs](https://img.shields.io/badge/newest_docs-blue.svg)](https://automation-tasks-rs.github.io/cargo-auto/cargo_auto/index.html)
//! ![cargo-auto](https://bestia.dev/webpage_hit_counter/get_svg_image/959103982.svg)
//!
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3114-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3106-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-1191-blue.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-687-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-699-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in tests](https://img.shields.io/badge/Lines_in_tests-10704-orange.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//!
Expand Down Expand Up @@ -2392,7 +2393,7 @@ jobs:
// but the new service worker will not be activated until all
// tabs with this webapp are closed.

const CACHE_NAME = '2024.419.1740';
const CACHE_NAME = '2024.419.1822';

self.addEventListener('install', event => {
console.log('event install ', CACHE_NAME);
Expand Down
11 changes: 6 additions & 5 deletions src/template_new_wasm_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -184,7 +185,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down Expand Up @@ -1707,7 +1708,7 @@ pub const RESET: &str = "\x1b[0m";
//! # cargo-auto
//!
//! **Automation tasks coded in Rust language for the workflow of Rust projects**
//! ***version: 2024.419.1816 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//! ***version: 2024.419.1824 date: 2024-04-19 author: [bestia.dev](https://bestia.dev) repository: [GitHub](https://github.com/automation-tasks-rs/cargo-auto)***
//!
//! ![maintained](https://img.shields.io/badge/maintained-green)
//! ![ready-for-use](https://img.shields.io/badge/ready_for_use-green)
Expand All @@ -1727,9 +1728,9 @@ pub const RESET: &str = "\x1b[0m";
//! [![Newest docs](https://img.shields.io/badge/newest_docs-blue.svg)](https://automation-tasks-rs.github.io/cargo-auto/cargo_auto/index.html)
//! ![cargo-auto](https://bestia.dev/webpage_hit_counter/get_svg_image/959103982.svg)
//!
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3114-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Rust code](https://img.shields.io/badge/Lines_in_Rust-3106-green.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Doc comments](https://img.shields.io/badge/Lines_in_Doc_comments-1191-blue.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-687-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in Comments](https://img.shields.io/badge/Lines_in_comments-699-purple.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in examples](https://img.shields.io/badge/Lines_in_examples-0-yellow.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//! [![Lines in tests](https://img.shields.io/badge/Lines_in_tests-10704-orange.svg)](https://github.com/automation-tasks-rs/cargo-auto/)
//!
Expand Down
5 changes: 3 additions & 2 deletions template_new_auto/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");

let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -63,7 +64,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down
5 changes: 3 additions & 2 deletions template_new_cli/automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");

let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -63,7 +64,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down
5 changes: 3 additions & 2 deletions template_new_pwa_wasm/automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");

let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -62,7 +63,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// but the new service worker will not be activated until all
// tabs with this webapp are closed.

const CACHE_NAME = '2024.419.1816';
const CACHE_NAME = '2024.419.1824';

self.addEventListener('install', event => {
console.log('event install ', CACHE_NAME);
Expand Down
5 changes: 3 additions & 2 deletions template_new_wasm/automation_tasks_rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fn main() {
///
/// The folder logs/ is in .gitignore and will not be committed.
pub fn tracing_init() {
let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");
// uncomment this line to enable tracing to file
// let file_appender = tracing_appender::rolling::daily("logs", "automation_tasks_rs.log");

let offset = time::UtcOffset::current_local_offset().expect("should get local offset!");
let timer = tracing_subscriber::fmt::time::OffsetTime::new(offset, time::macros::format_description!("[hour]:[minute]:[second].[subsecond digits:6]"));
Expand All @@ -62,7 +63,7 @@ pub fn tracing_init() {
.with_timer(timer)
.with_line_number(true)
.with_ansi(false)
.with_writer(file_appender)
//.with_writer(file_appender)
.with_env_filter(filter)
.init();
}
Expand Down

0 comments on commit 0e17558

Please sign in to comment.