New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Commodore Commodore
Commodore
1567 views

Write to a text/log file

Jump to solution

Has anyone ever tried writing a message into a text file in SM7.11?  I don't want to send the messages into the sm.log file.  I want to use my own log file in the server.

 

Would appreciate any ideas on this one.

 

Regards.

 

 

0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.
Hi P, Use javascript to achieve this. As rtecall("log") print message in sm.log file only.

View solution in original post

0 Likes
4 Replies
Absent Member.
Absent Member.
Hi P, Use javascript to achieve this. As rtecall("log") print message in sm.log file only.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

As Abhijit stated, Service Manager provides a JavaScript global method named writeFile (see Help Server). The documentation states it writes data to the local file system. It is important to note that SM supports server-side JavaScript only so the "local file system" is the server (not the user's client machine).

Highlighted
Commodore Commodore
Commodore
Neat! Thanks guys. Thanks for that very useful info.
0 Likes
Highlighted
Absent Member.
Absent Member.
Appreciate KUDOS.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.