Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

fixLogFile command

The fixLogFile command upgrades existing logging files after a logging system update, so that data continues to be readable by logCat.

Synopsis

fixLogFile [-d] [-s {save-file} ] [-r] [-a] [-S] [-o {spec} ] [-n {spec}][{file}...]

Description

When classes of logging messages are expanded, contracted, inserted, or removed, fixLogFile can change the index assignments of messages. When this happens, messages whose indexes changed and were logged under the previous environment become unexpandable by logCat. The fixLogFile command, given information about the previous assignments and the new assignments, upgrades logged data so that it remains expandable by logCat.

Each message is examined. If the class of messages appears in the new environment and still covers the index assigned to the message, a new index is assigned based on where it appears in the new environment. If the class of messages is no longer part of the message logging environment or if a class is reduced in size so that it no longer covers the index of a message, it is necessary to use one of the three options described in the following table:

Option

Description

-d

Deletes the message entirely from the logging file

-r

Demaps the message. This entails expanding the message in the old environment and creating a new logging message using the LOG_REMAP_DISCARD format so that the data is still readable in the log files, but is marked as being part of a discarded message environment. This is the default behavior.

-s {save_file}

Removes the message from the original logging file and saves it in the specified file, thus preserving the unique data for possible later retrieval

Normally, fixLogFile generates a short message about each file that it converts. The -s flag suppresses this output.

The fixLogFile command requires access to the old o.systemLog.h and o.textLogFmt files and the new systemLog.h file to perform its job. It expects to find these files in $LOGROOT/formats. If you use alternate sources of these files, use the -o and -n flags. Each of these flags takes a {spec} argument, which has the following form:

{dir}[,{systemLog.h}}[,{textLogFmt}]]

The default values for these two specifications is:

-o ${LOGROOT}/formats, o.systemLog.h, o.textLogFmt
-n
${LOGROOT}/formats, systemLog.h, textLogFmt

The {dir} portion specifies an alternate directory in which the [o.]systemLog.h and [o.]textLogFmt files are to be placed. If the remainder of the {spec} is missing, the default file names apply. If specified, the {systemLog.h} and {textLogFmt} portions specify the names of these two files as they are found in the specified {dir}. Any section of the specification that is skipped retains its previous or default value.

You may specify a list of one or more logging files. If they are listed, each file is assumed to be a compressed logging file and is converted. The -a option automatically converts all of the compressed logging files found in ${LOGROOT}/data. No file names can be provided if the -a option is specified. When the -a option is used, each regular file found in ${LOGROOT}/data is examined to see if it is a compressed logging file. If it is not, it is ignored. If it is, it is converted.

After the files are converted, the time stamps are reapplied so they have the same date after conversion as they did before conversion.

The fixLogFile command only takes care of changes in classes of logging message. For example, if the class PERM was added, removed, or moved, fixLogFile could correctly deal with the changes to the logging files. The fixLogFile command does not deal with reorganizations or changes of messages within a class. Do not change the order of appearance messages or the arguments to a logging message if you expect to be able to expand the data in the future or save the previous textLogFmt file for the expansions.

If the conversion takes place while the logdaemon process is running, be sure to either stop and restart logdaemon or reinitialize it using the reinitLog command.

See also

© 2006 Avaya Inc. All Rights Reserved.