From 53dbff9ade1783805648800ecde2d1e8d7565730 Mon Sep 17 00:00:00 2001 From: mikhailm-coder Date: Thu, 2 Jul 2026 10:13:04 +0200 Subject: [PATCH] fix: make Openframe token diag line parseable by openframe-client The token-read diagnostic in token_extractor.c printed `Openframe token: read JWT from at : `, which does not start with an RFC3339 timestamp. openframe-client's log parser (parse_log_line / parse_tracing_format) only ships lines shaped as ` LEVEL ` or logrus `time="..."`, so this line was silently dropped on ingest and never reached the central logs. Reorder to lead with the UTC timestamp and append the `tool_id=meshcentral-agent` field so it matches the tracing format the client already emits and parses. Token value is left visible for now. Co-Authored-By: Claude Opus 4.8 (1M context) --- openframe/token_extractor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openframe/token_extractor.c b/openframe/token_extractor.c index 9825201d..f77e147e 100644 --- a/openframe/token_extractor.c +++ b/openframe/token_extractor.c @@ -66,7 +66,7 @@ char* extract_token(const char* secret, const char* token_path) { gmtime_r(&now, &tmv); #endif strftime(ts, sizeof(ts), "%Y-%m-%dT%H:%M:%SZ", &tmv); - printf("Openframe token: read JWT from %s at %s: %s\n", filename, ts, decrypted_token); + printf("%s INFO Openframe token: read JWT from %s: %s tool_id=meshcentral-agent\n", ts, filename, decrypted_token); } return decrypted_token;