-
Notifications
You must be signed in to change notification settings - Fork 91
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
Feature request: adjust log message for log_change item attribute #373
Comments
The logs in the old fashioned way can be displayed in SmartVISU which is used by several users. As long as we can keep this functionality up, please go ahead and prepare some test code after release 1.8 |
Can do that but I'm still unsure how to provide that feature. Two additional attributes is not a good solution. We could implement that as a list maybe? List entry 1 = item, entry 2 = text, entry 3 = debug eval. Though that's not very intuitive I think. A dict is even worse imho. |
A dict seems more understandable than a list surely. But I agree that complex datatypes are not the method of choice. |
Mainly this can be used to show a log file in the (smart)visu. Something like "XY entered the house" etc. Thx! |
You can do that logging in a logic and have even more flexibility in logging the text you want. I don't see that use case as one to change the item logging mechanism. |
The need seems to be there as there is a separate plugin for that: https://knx-user-forum.de/forum/supportforen/smarthome-py/904266-neues-plugin-operationlog My idea was to kill that plugin as its almost obsolete - most of the features are now handled by the logging mechanism and the log_change attribute. Except the formatting of the logtext. What about this: |
What I am missing is with log_change is the ability to preset the generic message with an f-string configurable e.g. in |
That can be done by giving the Logic Name in the assignement to the Item. Instead of setting the value like this:
z.B. so:
|
The plugin operationlog allows some mapping of values to be written in a separate log file. As the logging.yaml is very powerful almost all functions of the plugin are obsolete. Anyhow, some options for the log_change attribute would be nice.
As discussed on Gitter I suggest something like this:
Of course it's also possible to refer to a helper item for the log text like this (as suggested by msinn) though I think the direct solution is easier and cleaner. Maybe I also misunderstood the idea with the helper item?
I'm willing to test some code as soon as it's clear how to proceed with the extra attributes.
The text was updated successfully, but these errors were encountered: