Previous Contents Index Next |
Setup Util Programmer's Guide |
Chapter 12 Using Log Files
This chapter explains how to write to log files. It contains the following sections:
How the Setup Util uses Log Files
How the Setup Util uses Log Files
During each component's installation, the Common Install Shell initializes a log file. As files are copied, the Shell records their destinations in this log. After a component is installed, its log file is saved as componentNickname.log in the serverroot/setup/componentNickame directory.
By default, the files listed in componentNickname.log are removed during uninstallation. If you want to keep certain files, use the Package Information File directives KeepDirectories or KeepFiles. These directives are discussed in Chapter 3 "Information Files."
Working with Installation Logs
In a basic scenario, you do not need to do anything to create an installation log. When the Common Install Shell unzips an archive, it initializes a log file and then writes the location of each copied file to it. The Shell also records whether pre- and post-installation programs succeed or fail.
If you want to write additional information to a log file, you can do so using the functions in setupapi.h. Table 12-1 summarizes the logging methods in this library.
Table 12-1 Logging methods in setupapi.h.
Writes a status message to the installation log. This is an alternative to setupLogMessage.
Retrieves an integer value from the Package Information File.
Logging and Uninstallation
When a user uninstalls a product, the installation log is read. Any listed file is deleted. If you want to preserve specific files or directories, use the KeepDirectories or KeepFiles directives in your Package Information File. For more information, see Chapter 3 "Information Files."
If you are uninstalling on Windows NT, the Common Install Shell will store an uninstallation log in your system's temporary directory.
Previous Contents Index Next
Copyright (C) 2005 Red Hat, Inc. All rights reserved.
This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/
Last Updated September 21, 2001