Skip to content

Commit

Permalink
chore: Add logging to Replicator JS
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarek-kindred committed Sep 13, 2023
1 parent 11f1e03 commit 7de322d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cohort_banking_replicator_js/src/cfg/config-kafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { JsKafkaConfig } from "cohort_sdk_js"
const kafkaConfig: JsKafkaConfig = {
brokers: ["127.0.0.1:9092"],
topic: "dev.ksp.certification",
clientId: "cohort-replicator-js3",
groupId: "cohort-replicator-js3",
clientId: "cohort-replicator-js",
groupId: "cohort-replicator-js",
producerSendTimeoutMs: 10,
logLevel: "info",
producerConfigOverrides: {},
Expand Down
9 changes: 3 additions & 6 deletions packages/cohort_sdk_js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "1", features = ["serde"] }
chrono = { version = "0.4.19", features = ["serde"] }
# Logging
log = { version = "0.4", features = [
"kv_unstable",
"std",
"kv_unstable_serde",
] }

# db migrations
#refinery = {version="0.8", features=["tokio-postgres"]}
# crate depencies
env_logger = { workspace = true }
log = { workspace = true }

cohort_sdk = { path = "../cohort_sdk" }
tokio = { workspace = true, features = ["full"] }
talos_cohort_replicator = { path = "../../packages/talos_cohort_replicator" }
Expand Down
2 changes: 2 additions & 0 deletions packages/cohort_sdk_js/src/installer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ impl Replicator {
config: JsReplicatorConfig,
// statemap_installer_callback: ThreadsafeFunction<JsStatemapAndSnapshot>,
) -> napi::Result<Replicator> {
env_logger::builder().format_timestamp_millis().init();

Ok(Replicator {
kafka_config,
config,
Expand Down

0 comments on commit 7de322d

Please sign in to comment.