Click here to Skip to main content
15,919,931 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I coded a library that allows to create unlimited instance of any service, in the following format:
"MyService1" have logSource "1MyServiceSource" and Log "1MyServiceLog"
"MyService2" have logSource "2MyServiceSource" and Log "2MyServiceLog"
....
In fact i'm storing the instance count in a xml file, when installing new instance this count is incremented,thus when starting the last installed service , the logsource and the log name are set based on this count to be similar to the related service's name.
The problem is when the pc restarts, as these services has Automatic Startup type (they should be), all the instances started and all their logs are saved in the same file ( it will be the last logfile).
(even if they have manual start, the problem remains cz we need to start the service each windows session)

My Question is, how can i pass the ServiceName on service-start, to be able to find the corresponding log source?
Thanks in advance.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900