-
Notifications
You must be signed in to change notification settings - Fork 73
Add throttle option for logging #166
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
Open
HannesBachter
wants to merge
14
commits into
team-vigir:develop
Choose a base branch
from
HannesBachter:feature/log_throttle
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6028c85
Add note re-future development
dcconner 5e52d07
Update for Melodic and Noetic releases version 1.4.0; move flexbe_beh…
dcconner 75778c5
Merge branch 'develop' into main; release 1.4.0
2402618
add info during test; remove deprecated 18.04 from GitHub action work…
ee8306b
update .github workflow version
bb9fd93
Merge branch 'develop' into main
8c87dfe
update maintainer tags in Noetic
4fd8d5e
ignore time dependent tests on build farm due to OS switching; just warn
39db47b
make cmake_minimum_version consistent 3.10.2 for Noetic
e1eab6d
1.4.1
9b02799
add Logger.log*_throttle
HannesBachter 0192336
connect throttle timestamp with unique logging id
HannesBachter 5deddc9
harmonize
fmessmer 55025a6
keep throttle helper dict to max 1024 entries
HannesBachter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
cmake_minimum_required(VERSION 3.10.2) | ||
project(flexbe_behavior_engine) | ||
find_package(catkin REQUIRED) | ||
catkin_metapackage() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>flexbe_behavior_engine</name> | ||
<version>1.3.1</version> | ||
<version>1.4.1</version> | ||
<description> | ||
A meta-package to aggregate all the FlexBE packages | ||
</description> | ||
|
||
<maintainer email="[email protected]">Philipp Schillinger</maintainer> | ||
<maintainer email="[email protected]">Alireza Hosseini</maintainer> | ||
<author>Philipp Schillinger</author> | ||
<maintainer email="[email protected]">Philipp Schillinger</maintainer> | ||
+ <maintainer email="[email protected]">David Conner</maintainer> | ||
<license>BSD</license> | ||
|
||
<url>http://ros.org/wiki/flexbe</url> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,13 @@ | |
schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>flexbe_input</name> | ||
<version>1.3.1</version> | ||
<version>1.4.1</version> | ||
<description> | ||
flexbe_input enables to send data to onboard behavior when required. | ||
</description> | ||
<maintainer email="[email protected]">Philipp Schillinger</maintainer> | ||
<author>Philipp Schillinger</author> | ||
<maintainer email="[email protected]">Philipp Schillinger</maintainer> | ||
+ <maintainer email="[email protected]">David Conner</maintainer> | ||
<license>BSD</license> | ||
|
||
<url>http://ros.org/wiki/flexbe_input</url> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,16 @@ | |
schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>flexbe_mirror</name> | ||
<version>1.3.1</version> | ||
<version>1.4.1</version> | ||
<description> | ||
flexbe_mirror implements functionality to remotely mirror an executed behavior. | ||
</description> | ||
<maintainer email="[email protected]">Philipp Schillinger</maintainer> | ||
<author>Philipp Schillinger</author> | ||
<maintainer email="[email protected]">Philipp Schillinger</maintainer> | ||
+ <maintainer email="[email protected]">David Conner</maintainer> | ||
<license>BSD</license> | ||
|
||
<url>http://ros.org/wiki/flexbe_mirror</url> | ||
<author>Philipp Schillinger</author> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
<buildtool_depend condition="$ROS_PYTHON_VERSION == 2">python-setuptools</buildtool_depend> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Thanks for adding! Would you see a way that entries can also be removed again eventually so that this dict can't grow infinitely?
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.
The
update
function would only update the entry within the dict (whose key is a combination of the logger level and the text) - so the dictionary would only have the max length of the number ofLogger.log*_throttle
sThis idea works only until the text within the log is not static, and in the worst case changing for every log (e.g. a timestamp).
As a safety-net I could add the clearing of the dict from all entries that are older than e.g. one hour (as the entries are
{log_id: timestamp}
)?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.
I think it would be sufficient as a safety-net to just check whether the number of dict entries exceeds a certain limit and then remove entries. As long as the limit is not exceeded, it's probably fine to keep old entries.
As a further idea, I would suggest to log a warning message if the size limit is reached because, as you pointed out, this would likely be caused by improper usage of the throttle such as a non-static messages.