Skip to content
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

Log character length limit for rule sets #7110

Closed
meingraham opened this issue Dec 5, 2019 · 4 comments
Closed

Log character length limit for rule sets #7110

meingraham opened this issue Dec 5, 2019 · 4 comments
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@meingraham
Copy link
Collaborator

Have you looked for this feature in other issues and in the wiki?
N/A

Is your feature request related to a problem? Please describe.
At times. When using a long set of rule in a rule set, one is unable to confirm that rules at the tail end are stored properly in the rule set because the resulting log is truncated. Also, any time one uses Rule<x> to inspect the rules, it is not possible to retrieve the full rule set.

Describe the solution you'd like
Extend the character limit for log messages (or at least for these) so that all of the preamble fields plus the full rule set can be output in the log.

Describe alternatives you've considered
Use decode_config.py. But for troubleshooting this is very cumbersome.

Additional context
N/A

(Please, remember to close the issue when the problem has been addressed)

@arendst
Copy link
Owner

arendst commented Dec 5, 2019

How about using the console feature of TDM. This uses MQTT and should report the complete information.

@meingraham
Copy link
Collaborator Author

So, usually when I post a feature request, typically it is not for something I'm implementing. Even my infamous "absolute PowerDelta" ;-) Ditto consolidation of SerialSend. This request is based on interactions with users where I found that the truncation of the rule impacted the troubleshooting.

Yes, TDM is another alternative. Nevertheless, using TDM (whether an executable, if available, or the installation of the required packages), would also be a tedious workaround... although admittedly probably less so than using decode_config.

@arendst
Copy link
Owner

arendst commented Dec 5, 2019

The current logsize is set to 520 characters. A moderate tradeoff between readable output and global memory use.

Looking at the rule will result in a text like:

16:05:22 MQT: stat/wemos4/RULE = {"Rule1":"OFF","Once":"OFF","StopOnError":"OFF","Free":0,"Rules":"12345678901any many more ending in ...

The max rule length is 511 characters. The loglength should cater for these 511 characters in addition to the time, topic and other rule information. As the topic can grow to 100 characters a nice logbuffer length would end up at around 185 + 511 = 696 characers.

So I'll increment log size to 700 characters to accomodate full rule logging ;-)

@ascillato2 ascillato2 added the enhancement Type - Enhancement that will be worked on label Dec 5, 2019
arendst added a commit that referenced this issue Dec 6, 2019
Change log buffer size from 520 to 700 characters accomodating full rule text (#7110)
@ascillato2 ascillato2 added the fixed Result - The work on the issue has ended label Dec 6, 2019
@ascillato2
Copy link
Collaborator

Closing this issue as it has been added. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

No branches or pull requests

3 participants