feat: rename --log-to-stdout to --console (#1163)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
7b1cdbe1f1
commit
3959bb9330
|
|
@ -34,7 +34,7 @@ COPY dragonfly-client-util/src ./dragonfly-client-util/src
|
|||
COPY dragonfly-client-init/Cargo.toml ./dragonfly-client-init/Cargo.toml
|
||||
COPY dragonfly-client-init/src ./dragonfly-client-init/src
|
||||
|
||||
RUN cargo build --release --log-to-stdout --bin dfget --bin dfdaemon --bin dfcache
|
||||
RUN cargo build --release --verbose --bin dfget --bin dfdaemon --bin dfcache
|
||||
|
||||
FROM public.ecr.aws/docker/library/alpine:3.20 AS health
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ COPY dragonfly-client-util/src ./dragonfly-client-util/src
|
|||
COPY dragonfly-client-init/Cargo.toml ./dragonfly-client-init/Cargo.toml
|
||||
COPY dragonfly-client-init/src ./dragonfly-client-init/src
|
||||
|
||||
RUN cargo build --log-to-stdout --bin dfget --bin dfdaemon --bin dfcache
|
||||
RUN cargo build --verbose --bin dfget --bin dfdaemon --bin dfcache
|
||||
|
||||
RUN cargo install flamegraph --root /usr/local
|
||||
RUN cargo install bottom --locked --root /usr/local
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ COPY dragonfly-client-util/src ./dragonfly-client-util/src
|
|||
COPY dragonfly-client-init/Cargo.toml ./dragonfly-client-init/Cargo.toml
|
||||
COPY dragonfly-client-init/src ./dragonfly-client-init/src
|
||||
|
||||
RUN cargo build --release --log-to-stdout --bin dfinit
|
||||
RUN cargo build --release --verbose --bin dfinit
|
||||
|
||||
FROM public.ecr.aws/debian/debian:bookworm-slim
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ After=network-online.target
|
|||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/dfdaemon --config /etc/dragonfly/dfdaemon.yaml --log-to-stdout
|
||||
ExecStart=/usr/bin/dfdaemon --config /etc/dragonfly/dfdaemon.yaml --console
|
||||
|
||||
Type=simple
|
||||
Environment=HOME=/root
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ cargo build --release --bin dfdaemon
|
|||
|
||||
```bash
|
||||
# prepare client.yaml by yourself.
|
||||
./target/release/dfdaemon --config client.yaml -l info --log-to-stdout
|
||||
./target/release/dfdaemon --config client.yaml -l info --console
|
||||
```
|
||||
|
||||
## FlameGraph
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ cargo build --all && mv target/debug/libhdfs.so {plugin_dir}/backend/libhdfs.so
|
|||
## Run Client with Plugin
|
||||
|
||||
```shell
|
||||
$ cargo run --bin dfdaemon -- --config {config_dir}/config.yaml -l info --log-to-stdout
|
||||
$ cargo run --bin dfdaemon -- --config {config_dir}/config.yaml -l info --console
|
||||
INFO load [http] builtin backend
|
||||
INFO load [https] builtin backend
|
||||
INFO load [hdfs] plugin backend
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ pub struct ExportCommand {
|
|||
log_max_files: usize,
|
||||
|
||||
#[arg(long, default_value_t = false, help = "Specify whether to print log")]
|
||||
log_to_stdout: bool,
|
||||
console: bool,
|
||||
}
|
||||
|
||||
/// Implement the execute for ExportCommand.
|
||||
|
|
@ -134,7 +134,7 @@ impl ExportCommand {
|
|||
self.log_max_files,
|
||||
None,
|
||||
None,
|
||||
self.log_to_stdout,
|
||||
self.console,
|
||||
);
|
||||
|
||||
// Validate the command line arguments.
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ pub struct ImportCommand {
|
|||
log_max_files: usize,
|
||||
|
||||
#[arg(long, default_value_t = false, help = "Specify whether to print log")]
|
||||
log_to_stdout: bool,
|
||||
console: bool,
|
||||
}
|
||||
|
||||
/// Implement the execute for ImportCommand.
|
||||
|
|
@ -140,7 +140,7 @@ impl ImportCommand {
|
|||
self.log_max_files,
|
||||
None,
|
||||
None,
|
||||
self.log_to_stdout,
|
||||
self.console,
|
||||
);
|
||||
|
||||
// Validate the command line arguments.
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ pub struct StatCommand {
|
|||
log_max_files: usize,
|
||||
|
||||
#[arg(long, default_value_t = false, help = "Specify whether to print log")]
|
||||
log_to_stdout: bool,
|
||||
console: bool,
|
||||
}
|
||||
|
||||
/// Implement the execute for StatCommand.
|
||||
|
|
@ -86,7 +86,7 @@ impl StatCommand {
|
|||
self.log_max_files,
|
||||
None,
|
||||
None,
|
||||
self.log_to_stdout,
|
||||
self.console,
|
||||
);
|
||||
|
||||
// Get dfdaemon download client.
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ struct Args {
|
|||
log_max_files: usize,
|
||||
|
||||
#[arg(long, default_value_t = true, help = "Specify whether to print log")]
|
||||
log_to_stdout: bool,
|
||||
console: bool,
|
||||
|
||||
#[arg(
|
||||
short = 'V',
|
||||
|
|
@ -147,7 +147,7 @@ async fn main() -> Result<(), anyhow::Error> {
|
|||
args.log_max_files,
|
||||
config.tracing.addr.to_owned(),
|
||||
Some(config.host.clone()),
|
||||
args.log_to_stdout,
|
||||
args.console,
|
||||
);
|
||||
|
||||
// Initialize storage.
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ struct Args {
|
|||
log_max_files: usize,
|
||||
|
||||
#[arg(long, default_value_t = false, help = "Specify whether to print log")]
|
||||
log_to_stdout: bool,
|
||||
console: bool,
|
||||
|
||||
#[arg(
|
||||
short = 'V',
|
||||
|
|
@ -305,7 +305,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
args.log_max_files,
|
||||
None,
|
||||
None,
|
||||
args.log_to_stdout,
|
||||
args.console,
|
||||
);
|
||||
|
||||
// Validate command line arguments.
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ pub fn init_tracing(
|
|||
log_max_files: usize,
|
||||
jaeger_addr: Option<String>,
|
||||
host: Option<Host>,
|
||||
log_to_stdout: bool,
|
||||
console: bool,
|
||||
) -> Vec<WorkerGuard> {
|
||||
let mut guards = vec![];
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ pub fn init_tracing(
|
|||
guards.push(stdout_guard);
|
||||
|
||||
// Initialize stdout layer.
|
||||
let stdout_filter = if log_to_stdout {
|
||||
let stdout_filter = if console {
|
||||
LevelFilter::DEBUG
|
||||
} else {
|
||||
LevelFilter::OFF
|
||||
|
|
|
|||
Loading…
Reference in New Issue