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

Add information on debugging #1045

Merged
merged 3 commits into from Oct 28, 2018
Merged

Add information on debugging #1045

merged 3 commits into from Oct 28, 2018

Conversation

cdjackson
Copy link
Collaborator

@mhilbush FYI if you have any comments
Signed-off-by: Chris Jackson chris@cd-jackson.com

@mhilbush FYI if you have any comments
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/z-wave-things-lose-their-lifeline-association-group/44244/87

@mhilbush
Copy link

I'll take a look in a couple hours.

@cdjackson
Copy link
Collaborator Author

cdjackson commented Oct 28, 2018 via email

Copy link

@mhilbush mhilbush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few comments/suggestions. Feel free to use as you see fit.

README.md Outdated

Z-Wave is a complex protocol, and there are many manufacturers producing thousands of devices that are expected to interact seemlessly. In the most part, this does work as hoped, however there are always devices with bugs, or features that don't work as expected. When this happens, the debug logging from the binding is the key to understanding, and ultimately solving, any issues.

To enable debug logging, log on to the console and enter the following command -:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure of the policy for embedding links in the documentation. If that's allowed/encouraged, you could include a link here (https://www.openhab.org/docs/administration/console.html).

```
log:set debug org.openhab.binding.zwave
```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To disable debug logging, enter the following command -:

log:set INFO org.openhab.binding.zwave

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm 99.9% sure it doesn't matter as I don't both using upper case and I've not noticed an issue. However I've changed it as it highlights the level better anyway...

README.md Outdated
To enable debug logging, log on to the console and enter the following command -:

```
log:set debug org.openhab.binding.zwave

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is lower case debug allowed? I normally use uppercase (DEBUG).

## When things don't go as planned

Z-Wave is a complex protocol, and there are many manufacturers producing thousands of devices that are expected to interact seemlessly. In the most part, this does work as hoped, however there are always devices with bugs, or features that don't work as expected. When this happens, the debug logging from the binding is the key to understanding, and ultimately solving, any issues.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When providing a debug log, provide the full log; don't filter anything out. Provide the log with plenty of context before and after the event you're trying to troubleshoot. Sometimes the root cause of the problem happens considerably beforehand. If the log file is too big to include in your forum post, place it on a file-sharing service, and include a link to the file in your post.

README.md Outdated
log4j2.appender.Zwave.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.Zwave.policies.size.size = 10MB
log4j2.appender.Zwave.strategy.type = DefaultRolloverStrategy
log4j2.appender.Zwave.strategy.max = 20

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this 10. I set it to 20 in this case because it was very unclear when the problem actually occurred.

@cdjackson
Copy link
Collaborator Author

Thanks Mark. I've taken into account your comments - much appreciated.

@mhilbush
Copy link

Sure thing. 👍

We now can provide a reference to this part of the doc, which hopefully will reduce some of the back and forth trying to get a good debug log.

@cdjackson cdjackson merged commit 5eab6b6 into master Oct 28, 2018
@cdjackson cdjackson deleted the cdjackson-patch-1 branch October 28, 2018 14:43
log4j2.appender.Zwave.name = ZWAVE
log4j2.appender.Zwave.type = RollingRandomAccessFile
log4j2.appender.Zwave.fileName = /opt/openhab2/userdata/logs/zwave.log
log4j2.appender.Zwave.filePattern = /opt/openhab2/userdata/logs/zwave.log.%i

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should've been:

log4j2.appender.Zwave.fileName = ${openhab.logdir}/zwave.log
log4j2.appender.Zwave.filePattern = ${openhab.logdir}/zwave.log.%i

@cdjackson
Copy link
Collaborator Author

cdjackson commented Oct 28, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants