Skip to content

Commit

Permalink
fix(atty): replacing env_logger with simple_logger due atty sec bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kiraum committed Nov 10, 2024
1 parent ba519a4 commit 714b048
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 52 deletions.
18 changes: 11 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,31 @@ All notable changes to this project will be documented in this file.

## [0.0.6] - 2024-11-10
### Added
- Adding max-tokens argument
- Adding max-tokens argument.

### Fixed
- Code was flushing last line data;
- Replacing env_logger with simple_logger (atty sec bug).

## [0.0.5] - 2024-10-06
### Added
- Adding auto-jql
- Adding auto-jql.

## [0.0.4] - 2024-10-02
### Performance
- Improved performance by implementing async batches processing
- Improved performance by implementing async batches processing.

## [0.0.3] - 2024-10-01
### Changed
- Migrated from Cody API v1 to v2
- Migrated from Cody API v1 to v2.

## [0.0.2] - 2024-09-30
### Added
- Extra options
- Extra options.

### Fixed
- Various bug fixes
- Various bug fixes.

## [0.0.1] - 2024-09-29
### Added
- Initial release
- Initial release.
122 changes: 85 additions & 37 deletions 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
Expand Up @@ -6,7 +6,7 @@ authors = ["kiraum <tfgoncalves@xpto.it>"]

[dependencies]
base64 = "0.13.0"
env_logger = "0.9"
simple_logger = "4.3.0"
futures = "0.3.28"
indicatif = "0.16"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ cargo run -- --message "Your question here" --jql "project = PROJ and created >
Additional options:
- `--max-issues`: Maximum number of issues to fetch (default: 100000)
- `--max-results`: Maximum number of results per Jira API call (default: 100)
- ` --max-tokens`: Maximum number of tokens in the response [default: 2000]
- `--max-tokens`: Maximum number of tokens in the response [default: 2000]
- `--debug`: Enable debug mode
- `--list-models`: List available models
- `--set-model`: Set the model to use
Expand Down
Binary file modified bin/macos-arm64/askJira
Binary file not shown.
Binary file modified releases/v0.0.6/askJira-v0.0.6-macos-arm64.tar.gz
Binary file not shown.
10 changes: 4 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use env_logger::Env;
use futures::future::join_all;
use indicatif::{ProgressBar, ProgressStyle};
use log::{debug, warn};
Expand Down Expand Up @@ -76,12 +75,11 @@ async fn main() -> Result<(), Box<dyn Error>> {
let opt = Opt::from_args();

// Set up logging based on debug flag
let env = if opt.debug {
Env::default().filter_or("RUST_LOG", "debug")
if opt.debug {
simple_logger::init_with_level(log::Level::Debug).unwrap();
} else {
Env::default().filter_or("RUST_LOG", "info")
};
env_logger::init_from_env(env);
simple_logger::init_with_level(log::Level::Info).unwrap();
}

debug!(
"Command line arguments: {:?}",
Expand Down

0 comments on commit 714b048

Please sign in to comment.