Skip to content

Commit 8d1ee6e

Browse files
authored
Merge pull request #5048 from msupply-foundation/5046-add-panic-log
Add log on panic to 2.2
2 parents 06ab987 + 0634766 commit 8d1ee6e

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "open-msupply",
33
"//": "Main version for the app, should be in semantic version format (any release candidate or test build should be separated by '-' i.e. 1.1.1-rc1 or 1.1.1-test",
4-
"version": "2.2.03",
4+
"version": "2.2.04",
55
"private": true,
66
"scripts": {
77
"start": "cd ./server && cargo run & cd ./client && yarn start-local",
88
"build": "cd ./client && yarn build && cd ../server && cargo build --release",
99
"test": "cd ./server && ulimit -n 1000 && cargo test && cd ../client && yarn test"
1010
}
11-
}
11+
}

server/Cargo.lock

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ anyhow = "1.0.56"
4545
actix-files = "0.6.0"
4646
# TODO: Remove. async_graphql is using 1.0 but SET_COOKIE was being imported from wrong version.
4747
http2 = { package = "http", version = "1.0.0" }
48+
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
4849

4950
[workspace.lints.clippy]
5051
wrong_self_convention = "allow"

server/android/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ actix-web = { workspace = true }
1313
futures = "0.3.30"
1414
jni = { version = "0.21.1" }
1515
log = { workspace = true }
16-
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
16+
log-panics = { workspace = true }
1717
once_cell = "1.19.0"
1818
rcgen = { workspace = true }
1919
repository = { path = "../repository" }

server/server/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ regex = { workspace = true }
4646
actix-multipart = { workspace = true }
4747
futures-util = { workspace = true }
4848
serde_json = { workspace = true }
49+
log-panics = { workspace = true }
4950

5051
[dev-dependencies]
5152
actix-rt = { workspace = true }

server/server/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ async fn main() -> std::io::Result<()> {
88
configuration::get_configuration().expect("Failed to parse configuration settings");
99

1010
logging_init(settings.logging.clone(), None);
11+
log_panics::init();
1112

1213
let off_switch = tokio::sync::mpsc::channel(1).1;
1314
start_server(settings, off_switch).await

server/windows/Cargo.toml

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ bench = false
1515
default-target = "x86_64-pc-windows-msvc"
1616

1717
[target.'cfg(windows)'.dependencies]
18+
windows-service = "0.5.0"
19+
eventlog = "0.2.2"
20+
21+
[dependencies]
1822
actix-web = { workspace = true }
1923
futures = { workspace = true }
2024
log = { workspace = true }
2125
server = { path = "../server", default-features = false }
2226
service = { path = "../service" }
2327
tokio = { workspace = true }
24-
windows-service = "0.5.0"
25-
eventlog = "0.2.2"
28+
log-panics = { workspace = true }
29+
30+
31+

server/windows/src/windows.rs

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ mod omsupply_service {
6666
}
6767
};
6868
logging_init(settings.logging.clone(), None);
69+
log_panics::init();
6970

7071
panic::set_hook(Box::new(|panic_info| {
7172
error!("panic occurred {:?}", panic_info);

0 commit comments

Comments
 (0)