Skip to main content
6-Contributor
Feb 14, 2024 7:22 AM UTC
Solved

How to access localhost access log in thingworx mashup

I want to find out how many times a mashup used. So for that I am developing a mashup that can access localhost access log from tomcat folder in server. So I want to know how to acess this log in mashup.

Rocko
RockoAnswer
19-Tanzanite
Feb 14, 2024 9:17 AM UTC

You can hire PTC or one of their partners to create such an extension, but it's not that hard to do yourself. Especially method 1) I suggested above could be done in little time. See https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Access_Log_Valve

 

7 replies

Rocko
19-Tanzanite
Feb 14, 2024 7:43 AM UTC

ThingWorx can't arbitrarily access folders in the file system. OOTB it has access to its own folders, and the folders of the File Repositories.

There are two (safe) ways to access this log from ThingWorx:

1) Configure tomcat to put this log into a folder of a ThingWorx File Repository

2) Create a java extension which reads the file from the tomcat folder. Extensions can access any folder.

Translate
6-Contributor
Feb 14, 2024 7:57 AM UTC

Hi,

Thanks for your responce, just wanted to know localhost access log is also created in thingworx composer?

Translate
Rocko
19-Tanzanite
Feb 14, 2024 7:59 AM UTC

No, it's created by Tomcat, not by ThingWorx.

Translate
14-Alexandrite
Feb 14, 2024 4:45 PM UTC

@ST_10584688 Check if symlink solves your requirements,

Translate