Skip to content

Commit

Permalink
Change amp-syncer logger format and levels
Browse files Browse the repository at this point in the history
  • Loading branch information
wangeguo committed Oct 25, 2023
1 parent aaf731f commit 54280ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 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
@@ -1,5 +1,5 @@
[workspace.package]
version = "0.6.6"
version = "0.6.7"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/amphitheatre-app/amphitheatre"
Expand Down
8 changes: 4 additions & 4 deletions syncer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mod handle;
#[tokio::main]
async fn main() -> Result<(), async_nats::Error> {
let filter = EnvFilter::builder().with_default_directive(LevelFilter::INFO.into()).from_env_lossy();
tracing_subscriber::fmt().with_env_filter(filter).init();
tracing_subscriber::fmt().without_time().with_target(false).with_env_filter(filter).init();

// This returns an error if the `.env` file doesn't exist, but that's not what we want
// since we're not going to use a `.env` file if we deploy this application.
Expand All @@ -40,12 +40,12 @@ async fn main() -> Result<(), async_nats::Error> {
// Parse our configuration from the environment.
// This will exit with a help message if something is wrong.
let config = Config::parse();
info!("Configuration: {:#?}", config);
debug!("Configuration: {:?}", config);

// initialize some variables
let workspace = Path::new(&config.workspace);

info!("Connecting to NATS server: {}", config.nats_url);
debug!("Connecting to NATS server: {}", config.nats_url);
let consumer = connect(&config).await?;

// Consume messages from the consumer
Expand Down Expand Up @@ -86,7 +86,7 @@ async fn main() -> Result<(), async_nats::Error> {

// If we're in once mode, exit after overwrite.
if config.once && req.kind == Overwrite {
info!("Exit after sync once (Overwrite), bye!");
info!("Finished syncing, exiting...");
std::process::exit(0);
}
}
Expand Down

0 comments on commit 54280ae

Please sign in to comment.