-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(logging): disable logging in shim to improve performance
Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
- Loading branch information
1 parent
fe06e73
commit f88ffaa
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
use containerd_shim::Config; | ||
use containerd_shim_wasm::container::Instance; | ||
use containerd_shim_wasm::sandbox::cli::{revision, shim_main, version}; | ||
|
||
mod engine; | ||
|
||
fn main() { | ||
shim_main::<Instance<engine::SpinEngine>>("spin", version!(), revision!(), "v2", None); | ||
// Configure the shim to disable all logging for performance improvements. | ||
// TODO: consider supporting some logging once log level specification is | ||
// supported in https://github.com/containerd/rust-extensions/pull/247 | ||
let shim_config = Config { | ||
no_setup_logger: true, | ||
..Default::default() | ||
}; | ||
shim_main::<Instance<engine::SpinEngine>>( | ||
"spin", | ||
version!(), | ||
revision!(), | ||
"v2", | ||
Some(shim_config), | ||
); | ||
} |