Skip to main content
4-Participant
May 20, 2025
Solved

Semaphore implementation

  • May 20, 2025
  • 2 replies
  • 646 views

HI All,

I am writing program to add a semaphore where I wanted to set the value of flag base on Finished logger message for a particular service in script logs.

Can someone please guide on this please.

Regards,
Tushar

Best answer by CharlesJi

Hi @TusharG,

 

By mentioning Semaphore, do you mean adding some global value as a flag, which others could monitor and change for specific logic?

For this part, I guess you can use any properties on a Thing to implement such flags.

 

As for the rest -  monitoring some specific logger messages, I don't think we have such OOTB functionalities to do so. However, I assume you can still achieve this by directly checking & setting the flag in that service code instead of monitoring the message after the service.

2 replies

CharlesJi16-PearlAnswer
16-Pearl
May 29, 2025

Hi @TusharG,

 

By mentioning Semaphore, do you mean adding some global value as a flag, which others could monitor and change for specific logic?

For this part, I guess you can use any properties on a Thing to implement such flags.

 

As for the rest -  monitoring some specific logger messages, I don't think we have such OOTB functionalities to do so. However, I assume you can still achieve this by directly checking & setting the flag in that service code instead of monitoring the message after the service.

TusharG4-ParticipantAuthor
4-Participant
June 26, 2025

Thanks Charles,

I have followed the same and it worked in my case. 

Regards,
Tushar

16-Pearl
June 9, 2025

Hi @TusharG ,

I just posted a reply to answer your question. If you think it's helpful, it would be great if you could designate it as the Accepted Solution for the benefit of other community members who may have the same question.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,

Charles