Microsoft KB Archive/274580

= Creating Supplementary Timestamp Log in MMS Management Agent Logs =

Article ID: 274580

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Metadirectory Services 2.1
 * Microsoft Metadirectory Services 2.2 Service Pack 1

-



This article was previously published under Q274580



SUMMARY
This article discusses the procedure to create a supplementary timestamp log in the Microsoft Metadirectory Services Management Agent (MA) logs.

Even though you cannot directly embed timestamps in the Zscript file logs, a supplemental log file can be created in the MA control script to contain the timestamp messages.



MORE INFORMATION
There are two components that can create a supplemental log file:
 * A batch file in the \Zoomserv\Bin directory.
 * The corresponding changes in the Zscript file template.

An Example:
In this example, the batch file is called Stampit.bat.

Place the batch file in the \Zoomserv\Bin directory, and then place the output files in the working directory of the Management Agent. This latter step can be accomplished by using the  variable in the second parameter of the calls to the Stampit.bat file in the Zscript file template.

The following commands are used in the program located in \Zoomserv\Bin\Stampit.bat:

'''echo %2 >> %1

date /t >> %1

time /t >> %1

echo. >> %1

'''

NOTE: Do not use any spaces in the local parameters used in the vset command.

The following commands can be used in the Zscript file template:

'''vset timeLogFile = &quot;ThisMATimeLog.txt&quot;

vset banner = &quot;************************************&quot;

vset message1 = &quot;LDAP_MA_Begins&quot;

vset message2 = &quot;LDAP_MA_Ends&quot;

execute stampit.bat \

execute stampit.bat \

execute stampit.bat \   '''

The output of the preceding example is:



Tues 09/19/2000

10:21a

LDAP_MA_Begins

Tues 09/19/2000

10:21a

LDAP_MA_Ends

Tues 09/19/2000

10:22a

NOTE:


 * The use of local variables and the vset command can help minimize the chances of typographical mistakes.
 * Local variables can be grouped together at the start of the template.
 * The banner helps to easily identify the start of each run.
 * The file can continue to grow, run after run, and must be manually maintained.
 * The call to the batch program and each line in the batch program is written to the Zscript file log.

Keywords: kbenv kbinfo KB274580

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.