ofSetLogLevel(module, level) adds to map but dosen't remove
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- observability
Research direction
Start by locating the implementation of ofLogSetLogLevel and the map used for module log levels. Reproduce repeated module-level changes, then verify that resetting a module to OF_LOG_NOTICE or the current log level no longer leaves its name retained in the map.
Written by the indexing model from the issue text.
Description
I talked to Arturo about this, but I want to make sure it's known. When you call ofLogSetLogLevel with a module string, that string is added to a map used to check the module's log level ... but right now that string is never removed.
If someone creates a large amount module names the map could grow arbitrarily large over time. The thought so far is that no one would make enough module names for it to be a problem.
For instance, using the proposed ofThread rewrite, each thread creates a new module name when it sets itself to verbose and, in the case of spawning lots of verbose worker threads, the map will grow.
My proposed solution would be to remove the module name from the map when the level for that module is set back to OF_LOG_NOTICE and/or to the current log level.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openframeworks/openFrameworks
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
openframeworks/openFrameworks#6532 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
openframeworks/openFrameworks#6380 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
openframeworks/openFrameworks#4817 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
openframeworks/openFrameworks#8553 · 1 comment ·
-
projectGenerator (vs): addon .c sources compiled as C++, causing unresolved externals (ofxLua: 55) Open
openframeworks/openFrameworks#8546 · 1 assignee ·
All issues in openframeworks/openFrameworks
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·