You can 1st look at an example available in the PI SDK Programming Reference which you can download from the Library section. There are a examples that you can refer to on how you can write messages to message log. You can look for "SendLogMessage" and "MessageLog" examples in the reference.
Another quick way to look at it is in the PI SDK help file (open About-PISDK, select "View Help").
If you have more questions regarding the examples, we can discuss it further. =]
Hi Han Yong, Thanks for the reposonse. I tried out "SendLogMessage" and "MessageLog" methods of PI SDK, both the methods will meet my needs of logging the data into PI Message logger from an external application as well as ACE. Thanks & Regards Kavita
Can you explain your needs a bit more? Will you write custom message in PI Server log? This is useful< for example, for ACE calculations (because there's no user interface) or for some other special needs. I have sample of this code (I think that I've already posted it here; I try tom locate it)