FEATURE: Add cmdlog optional filtering #935
Open
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.
π Related Issue
β¨οΈ What I did
cmdlog filterλͺ λ Ήμ μ²λ¦¬νλprocess_cmdlog_filter()ν¨μλ₯Ό μΆκ°νμ΅λλ€.is_cmdlog_filter_match()ν¨μλ₯Ό μΆκ°νμ΅λλ€.cmdlog_write()κ° κΈ°μ‘΄κ³Ό λμΌν λμμ νκ²λ commandμ λν λ‘μ§μ μμ νμ΅λλ€.cmdlog_add(), cmdlog_remove(), cmdlog_list()ν¨μλ₯Ό μΆκ°νμ΅λλ€.struct cmd_log_filter filters[CMDLOG_FILTER_MAXNUM]μ μΆκ°νμ΅λλ€.λͺ μΈ
cmdlog filter add [command <cmd>] [key <key>]λ‘ νν°λ₯Ό λ±λ‘νλ€. command, key μ΅μ μ€ νλλ μλ΅ν μ μλ€. μλ΅λ μ΅μ μ νν°λ§νμ§ μλλ€. λ¬Έμ μ ν¨μ± κ²μ¬λ μννμ§λ§, λͺ λ Ήμ΄μ ν€μ μ‘΄μ¬ μ¬λΆλ₯Ό κ²μ¬νμ§ μλλ€. νν° μμλ μ νμ΄ μ‘΄μ¬νλ€.μμ
cmdlog filter remove (index)λ‘ νν°λ₯Ό μμ νλ€. μΈλ±μ€λ₯Ό μ λ ₯νλ©΄ μ°Ύμ μμ νκ³ , μλ΅ μ λͺ¨λ νν°λ₯Ό μμ νλ€.μμ
cmdlog filter listλ‘ νν° λͺ©λ‘μ μΆλ ₯νλ€. νμ¬ νν° μμ μ΅λ νν° μλ₯Ό κ°μ΄ μΆλ ₯νλ€.μμ