-
Notifications
You must be signed in to change notification settings - Fork 27
RSDK-6170 - add debug log support #299
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
Changes from 3 commits
9933557
838a3a0
219532b
e49a32a
34f1fd5
2607f84
60897ca
e9eb0dc
56c8e67
87f475c
41ac2f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #pragma once | ||
|
|
||
| namespace viam { | ||
| namespace sdk { | ||
| namespace impl { | ||
|
|
||
| const char debug_map_key[] = "com.viam.debug_key_internal"; | ||
|
|
||
| } // namespace impl | ||
| } // namespace sdk | ||
| } // namespace viam |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,13 +58,32 @@ class ClientContext { | |
| ClientContext(); | ||
| operator grpc::ClientContext*(); | ||
| operator const grpc::ClientContext*() const; | ||
| void set_debug_key(const std::string& debug_key); | ||
|
|
||
| private: | ||
| void set_client_ctx_authority_(); | ||
| void add_viam_client_version_(); | ||
| grpc::ClientContext wrapped_context_; | ||
| }; | ||
|
|
||
| /// @brief Returns a new `AttributeMap` with a random key for server-side debug logging | ||
| AttributeMap debug_map(); | ||
|
|
||
| /// @brief Returns a new `AttributeMap` with @param debug_key for server-side debug logging | ||
| /// @throws Exception if the debug_key contains invalid (e.g., uppercase) gRPC characters | ||
| AttributeMap debug_map(std::string debug_key); | ||
|
|
||
| /// @brief Adds @param debug_key for server-side debug logging to @param map | ||
| /// @throws Exception if the debug_key contains invalid (e.g., uppercase )gRPC characters | ||
|
||
| AttributeMap add_debug_entry(AttributeMap&& map, std::string debug_key); | ||
|
|
||
| /// @brief Adds @param debug_key for server-side debug logging to @param map | ||
| /// @throws Exception if the debug_key contains invalid (e.g., uppercase )gRPC characters | ||
| AttributeMap add_debug_entry(AttributeMap map, std::string debug_key); | ||
|
|
||
| /// @brief Adds a random key to @param map for server-side debug logging | ||
| AttributeMap add_debug_entry(AttributeMap&& map); | ||
|
||
|
|
||
| /// @brief Set the boost trivial logger's severity depending on args. | ||
| /// @param argc The number of args. | ||
| /// @param argv The commandline arguments to parse. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this suggestion doesn't remove the
debug_keyvariable creation so I'm modifying locally and pushing, but will make this change!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops yes haha limitation of github inline code suggestions