Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement timestamps in logs for Github issues #52

Merged
merged 3 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
log.csv
196 changes: 196 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ bitflags = "2.5.0"
#
hostname = "0.3.1"

chrono = "0.4"
#
lazy_static = "1.4.0"

Expand Down Expand Up @@ -71,13 +72,16 @@ tracing-core = { version = "0.1.32" }
# Fmt subscriber
tracing-subscriber = "0.3"

tracing-appender = "0.2.3"

# To see instrumentation through tokio console
console-subscriber = { version="0.2.0", optional = true }

[features]

# Enable tracing in stdout
trac-fmt = [ ]
log-issue = [ ]

# Enable tracing in tokio console
trac-console = [ "console-subscriber" ]
Expand Down
7 changes: 6 additions & 1 deletion src/builtin_devices/panduza/server/itf_platform.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

use async_trait::async_trait;
use serde_json::Value;
use serde_json::{json, Value};

use crate::{attribute::JsonAttribute, interface::{self, AmInterface}, subscription};
use crate::interface::Builder as InterfaceBuilder;
Expand Down Expand Up @@ -149,6 +149,11 @@ impl interface::fsm::States for TestInterfaceStates {
ii.update_attribute_with_json("devices", "hunting",
ps.lock().await.get_device_store()
);


ii.update_attribute_with_string("dtree", "name", &"pok".to_string());
ii.update_attribute_with_json("dtree", "content", &json!({ "a": 1 }));

ii.publish_all_attributes().await;


Expand Down
Loading