|
|
|
|
|
- Overview
- The different types of logs
- Logs available in HFSQL Classic mode
- Logs available in HFSQL Client/Server mode
- Implementing the log process
- Defining the log process for the data files
- Defining the log process for the items
- Generating the analysis
- Automatic data modification and log process
- The different files created when implementing the log process
- Files created in HFSQL Classic mode
- Files created in HFSQL Client/Server mode
- WDLog: log management utility
- Handling the logs programmatically
- Two data files must not use the same log file
Implementing the log process in an application
Disponible solo con estos tipos de conexión
Regardless of the data files used by your application (HFSQL Classic or HFSQL Client/Server), the log process can be implemented on these data files. To implement the log process on the files of your application, you must: - Define the type of log process to perform.
- Define the log process for the data files.
- Define the log process for the items.
The files created by the log process depend on the type of access to your data files (HFSQL Classic or HFSQL Client/Server). Files with logs can be manipulated programmatically or using WDLog. The different types of logs Implementing the log process Defining the log process for the data files The log process on HFSQL Classic or Client/Server data files is implemented in the data model editor. To implement the log process on a data file described in the analysis: - Make a backup copy of the data files in their current status with WDLog.
- In the data model editor, open the description of the desired data file:
- Select the data file in the editor.
- Select "Description of data file" in the context menu.
- On the "Miscellaneous" tab, select the type of log to manage for this data file.
- Depending on the selected option, specify (if necessary) the directory of the different files created by the log process.
Defining the log process for the items By default, all items of a logged file are automatically logged. You have the ability to define: - whether some items must be logged or not. For example, if one of the data files uses a memo item to store an image (information not that important and that does not change very often), you have the ability not log this item.
- whether the logged item must be a key in the log. This option allows you to easily retrieve a record in the log.
To avoid implementing a log on an item: - Display the file description.
- Display the description of requested item.
- On the "Advanced" tab, uncheck "Crear registro del campo".
Generating the analysis Once the log process was defined in the data model editor, the analysis can be generated. Caution: Before performing this operation, we recommend you back up your data files with WDLog. Automatic data modification and log process When the automatic data file modification is performed on logged data files: - The log files are automatically saved.
- The log files are flushed.
The different files created when implementing the log process WDLog: log management utility WDLog is used to: - Save and restore your data files
- Check the consistency of a log and clear it if necessary
- Restore a data file from its log.
- Find out who modified a record, and when, ...
This tool can be freely distributed along with your applications. For more details, see WDLog. Handling the logs programmatically The management of logs is automatically performed. However, several WLanguage functions can be used to handle the logs: | | HChangeLogDir | Dynamically change the location of log files corresponding to an HFSQL file (*JNL file and LogOperation and LogIdentification files).
| HHistoryModification | Returns the modifications made to one or more items of a given record. | HLogInfo | Adds comments to the log when saving the logged operation. These comments can be viewed in WDLog. | HLogRecreate | Recreates an empty log. This function is used to reset a log to 0 after a backup or a replication for example. The content of the existing files is lost. | HLogRestart | Restarts the log process on a file. This log process was stopped by HLogStop. | HLogStop | Stops the log process of a file. The operations performed in the logged file are not saved anymore. | HRegenerateFile | Regenerates a file from its log. | HSetLog | Used to enable (or not) the log management. This management is enabled by default. If logs do not have to be managed in a process, call HSetLog(False). In this case, the execution of the processes will be faster. |
The WLanguage properties can also be used to manage the logged files: | | LogDirectory | Manages the log file directory described in the analysis. You can:- Find out the directory of log for a file defined in the data model editor or dynamically.
- Define the log directory for a file that was defined dynamically.
| LogFile | Allows you to find out whether a data file is a log file or not. | LogMethod | Identifies the log mode used for a data file (defined in the data model editor or dynamically). | OperationLogDirectory | Allows you to manage the directory of the log of operations file associated with a Journalé file.. You can:- Find out the directory of operation log linked to a logged file defined in the data model editor or dynamically.
- Define the log file directory for a file defined dynamically.
|
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|