cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Delete Application Logs with a script

vmihai
12-Amethyst

Delete Application Logs with a script

Hello,

Is there a way to delete application logs entries with a script from ThingWorx ? I saw in the LogView mashup that we have access to the ApplicationLog resource that has a QueryLogEntries function, but i couldn't find any function similar to deleteStreamEntry or purgeStreamEntries anywhere.

Any advice on this ?

Thank you,

Veronica

ACCEPTED SOLUTION

Accepted Solutions
Aanjan
12-Amethyst
(To:vmihai)

Veronica, the Logging Subsystem has settings where you can configure the retention for logs (default is 100mb and 7 days). The logs are usually dynamically generated, so we don't recommend running the purge to clear out existing entries though a custom service.

View solution in original post

3 REPLIES 3
Aanjan
12-Amethyst
(To:vmihai)

Veronica, the Logging Subsystem has settings where you can configure the retention for logs (default is 100mb and 7 days). The logs are usually dynamically generated, so we don't recommend running the purge to clear out existing entries though a custom service.

ttielebein
14-Alexandrite
(To:vmihai)

Why do you want to do this? I don't believe there is any built-in functionality for this in ThingWorx, but you could always just delete or rename the ApplicationLog.log file found within the /ThingWorxStorage/logs folder.

Hope this helps!

Tori

vmihai
12-Amethyst
(To:vmihai)

Thank you for your answers. I want to prevent the space on the hard drive from increasing  because of the logs. I will look into the Logging Subsystem and set it up from there.

Announcements


Top Tags