Skip to content

Commit

Permalink
Add GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tjardoo committed Sep 12, 2024
1 parent f38bd10 commit ed6f897
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/cargo-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cargo build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
cargo-build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
20 changes: 20 additions & 0 deletions .github/workflows/cargo-clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cargo clippy

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
cargo-clippy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Clippy
run: cargo clippy --tests --workspace --all-targets -- -D warnings
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Ftail is simple logging implementation for the `log` crate with support for multiple drivers.

- [Console (standard output logging)](#console)
- [Formatted console (formatted output logging)](#formatted-console)
- [Single (single log file)](#single)
- [Daily (daily log rotation)](#daily)
- [Custom (custom log driver)](#custom)
- [Console](#console)
- [Formatted console](#formatted-console)
- [Single](#single)
- [Daily](#daily)
- [Custom](#custom)

## Usage

Expand All @@ -15,7 +15,7 @@ use ftail::Ftail;
use log::LevelFilter;

Ftail::new()
.stdout(LevelFilter::Trace)
.console(LevelFilter::Debug)
.init()?;

log::debug!("This is a debug message");
Expand Down Expand Up @@ -84,7 +84,7 @@ examples\console\src/main.rs:16

### Single

Logs to a single file.
Logs to the single log file `logs/demo.log`.

The `single` driver takes the following parameters:

Expand All @@ -100,7 +100,7 @@ Ftail::new()

### Daily

Logs to a daily log file.
Logs to a daily log file in the `logs` directory.

The `daily` driver takes the following parameters:

Expand Down

0 comments on commit ed6f897

Please sign in to comment.