Java SDK Logging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Java SDK Logging
Is there any type of example explaining how to write to the ThingWorx log from a remote device using the Java SDK?
I've found some amount on writing to the TW log from an extension, which is somewhat similar, but there appears to be some differences and some libraries the Java SDK does not use.
Any help would be much appreciated. Thanks!
Solved! Go to Solution.
- Labels:
-
Connectivity
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alex,
I really don't think there is a built in way to log to the platform from a Java SDK, but there are some workarounds I can think of.
The best one that comes to mind is the following:
If you go to [server-address]/Thingworx/logs ​and then click on one of the available logs you can see that they have ServiceDefinitions. The service you will find most valuable is this scenario is the ​Write​ service. By making a REST call from the Java SDK to the Write service for the log of your choosing, you can log a new message whenever you need to.
Hope that helps.
Meghan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You could find that right here: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS229833​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is regarding logging in extensions, not the Java SDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Alex,
I really don't think there is a built in way to log to the platform from a Java SDK, but there are some workarounds I can think of.
The best one that comes to mind is the following:
If you go to [server-address]/Thingworx/logs ​and then click on one of the available logs you can see that they have ServiceDefinitions. The service you will find most valuable is this scenario is the ​Write​ service. By making a REST call from the Java SDK to the Write service for the log of your choosing, you can log a new message whenever you need to.
Hope that helps.
Meghan