Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

5 Setting basic conversion options > 5.2 Logging conversion events


5.2 Logging conversion events

Whenever you convert a document, by default Mif2Go records conversion events in a plain ASCII log file located in the project directory. This event log lists files opened and any error messages or warnings that are produced during conversion. At the start of the next conversion run, Mif2Go appends the finished event log to a history file before starting a new log.

To disable logging, or to change the name or location of the log file or history file:

[Logging]

; UseLog = Yes (default, log as specified in this section) or No

UseLog = No

; LogFileName = name with path (absolute, or relative to project dir)

LogFileName = _m2g_log.txt

; EditorFileName = text editor executable to display log if errors

EditorFileName = notepad.exe

; ShowLog = Yes (default, display log in text editor if errors or

; warnings) or No

ShowLog = Yes

; HistoryFileName = name with path of cumulative log history, to which

; the contents of LogFileName are appended.

HistoryFileName = _m2g_history.txt

The default name of the log file is _m2g_log.txt, and the default name of the history file is _m2g_history.txt. Unless you specify a different path for LogFileName or for HistoryFileName, Mif2Go writes the log file and history file to the project directory. If you specify a relative path, that path is relative to the project directory.

At the start of a conversion Mif2Go appends the contents of any existing log file (named by LogFileName) to the history file named by HistoryFileName, then deletes the contents of the old log file.Because the purpose of the log is to make diagnosing problems easier, Mif2Go appends log entries to the history file for successive conversions. A key diagnostic approach is to compare entries from successive conversion runs, and not necessarily just the last two runs.

When ShowLog=Yes, if you are running the conversion from the FrameMaker plug-in, if any warnings or errors occur, the plug-in pops up the log file in the editor named by EditorFileName. The default editor is notepad.exe. If you specify a text editor that is not on the system execution path, you must include its full path in the value for EditorFileName. If you are running Mif2Go from the command line, each Mif2Go DLL pops up the log file if errors or warnings are encountered.

When UseLog=Yes, you can specify the type and the importance (or level of severity) of events Mif2Go reports in the log file:

[Logging]

; These take severity values, 1 (greatest) to 9 (least),

; or 0 to prevent logging (except for LogInfo)

; LogErrors = 1 (default, log events that terminate a process)

LogErrors = 1

; LogWarnings = 1 (default, log problems with workarounds that might

; result in undesired output)

LogWarnings = 1

; LogQuerys = 1 (default, log possible ambiguities)

LogQuerys = 1

; LogInfo = 1 (default, log process information; 0 is ignored)

LogInfo = 1

; LogDebug = 0 (default, do not log possible programming issues)

LogDebug = 0

Log entry types are as follows: 

[spacer]

E  

Error: process terminated

W  

Warning: problem with a workaround

Q  

Query: possible ambiguity

I  

Information only

D  

Debug: possible programming issue

By default, Mif2Go logs only the most important or severe events (level 1), but not less important or less severe events (levels 2 through 9). At level 1 only the most important processing events are logged, such as the start of processing for each FrameMaker file and the identity of the software module doing the processing. Unless you specify otherwise Mif2Go does not log events classified as debugging issues.

Note:  When UseLog=Yes, process information is always logged, even if you set LogInfo=0.

Each log entry appended to the log file includes the following information:

timestamp (if different from the previous entry), on a line by itself

event type (E, W, Q, I, or D)

severity level or importance (from 1 = most severe or important to 9 = least severe or important)

event description.

Flagging uncatalogued formats

By default, Mif2Go logs a warning about any format that is used in your document but not defined in the FrameMaker catalog. If you get tired of seeing warnings about uncatalogued formats:

[Logging]

; ShowUndefinedFormats = Yes (default) or No

ShowUndefinedFormats = No

Recording configuration chains

In addition to logging conversion events, you can have Mif2Go include in the event log all the chains of configuration files and templates referenced by your project:

[Logging]

; LogIniChains = No (default) or Yes, list all chains

LogIniChains = Yes

When LogIniChains=Yes, before listing events, Mif2Go shows the full path of every configuration file and template used in processing, in the order they are referenced by settings in the [Templates] section. For example:

I1: Ini chain for Configs:

I1: _m2omnihelp.ini

I1: ..\_config\m2gug_htm_document.ini

I1: ..\_config\m2gug_document.ini

I1: g:\omnisys\m2g\local\config\local_m2omnihelp_config.ini

I1: g:\omnisys\m2g\system\config\m2omnihelp_config.ini

I1: g:\omnisys\m2g\local\config\local_m2help_config.ini

I1: g:\omnisys\m2g\system\config\m2help_config.ini

I1: g:\omnisys\m2g\local\config\local_m2htm_config.ini

I1: g:\omnisys\m2g\system\config\m2htm_config.ini

I1: g:\omnisys\m2g\local\config\local_m2g_config.ini

I1: g:\omnisys\m2g\system\config\m2g_config.ini

I1: g:\omnisys\common\local\config\local_omsys.ini

I1: g:\omnisys\common\system\config\omsys.ini

This output shows the chain of general configuration files and templates referenced from starting configuration file _m2omnihelp.ini, for a project to generate OmniHelp from FrameMaker.

A log-file example that shows a warning:

Sat Oct 04 11:38:21 2008

I1: Starting log for dwhtm, h285z10

I1: Opened file "planning.htm" for HTML

I1: File ID is z102x

W2: Xref target ag123456 not found in intro.ref

The W2 entry is a warning, severity level 2, about a cross-reference destination missing from the Mif2Go-generated reference file for chapter intro.fm.



5 Setting basic conversion options > 5.2 Logging conversion events