{{indexmenu_n>1}} ====== LOG ENABLING ====== \\ To enable the log we have to change the loglevel parameters from the replicator.ini file at the Windows folder. We can enable the replica server log and the database log of an specific project.\\ \\ {{ :replica:servidor:replicator_ini_activar_log.png?nolink |}} \\ At the **[server]** key we will search "**LogLevel**" and we will put the value to 7.\\ At the **[dbid-1]** key or the number we have associated to the project from which we want to get log, also, we will search this key "**LogLevel**" and we will put it to 7 too.\\ \\ After doing this change, it is necessary to restart the replica server in order the changes at the replicator.ini file take effect. If we have not indicated otherwise, the generated log files will be at the path "**C:\Windows\System32\LogFiles\CGSoftRpl\**".\\ \\ In case we have the replica server configuration in database, at the XOneReplicator database we have to look for these two keys:LogLevel. The key for the server log is in the "**SCRATCH_CONFIGURATION**" table, and the specific project log from which we want the log we have to look for it at the "**SCRATCH_DBCONFIG**" table, by looking the log that corresponds to the DBID of the project. \\ \\ The replica system of the server part has available a control mechanism, so that it is possible to generate a Log where each one of the actions made will be saved. \\ \\ The Log system can get to write quite, so it is convenient that only it will be enabled if we find out that any kind of error it exists into our system. \\ \\ ===== DATABASE LOG ===== \\ The Database of the solution has available a table which writes the main errors, it is the **master_replica_errorlog** table.\\ \\ For writting the errors in this table nothing has to be done, since by default, if it exists any important error, the error will be written in this table, by putting which license gives such error and a description of it.\\ \\ ===== FILE LOG ===== \\ This Log is much more powerful, and here will be written each and every one of the operations, before or after the error exists. \\ \\ The file Log by default is saved in the path **%SYSTEM32%\LogFiles\CgsoftRpl**.\\ \\ There are three types of file Log:\\ \\ - **LICENSE LOG** - **SERVER LOG** - **DATABASE LOG** \\ The license log and the server´s are enabled with the **LogLevel** of the key **[server]** from the **replicator.ini** or of the "**SCRATCH_CONFIGURATION**" table, in case we have the configuration in database. \\ ==== LICENSE LOG==== \\ Its format is: SV.licenciadebasededatos_ficheroLIC.yyyymmdd.txt\\ \\ Such file checks if the executable is properly associated to the LIC file from Windows.\\ \\ This Log will tell us if everything is correct, and if there is any problem in that sense it couldn´t be started. \\ \\ This problem can be caused because the LIC is not of the same license than the executable. \\ \\ ==== SERVER LOG ==== \\ Its format is SVyyyymmdd.txt\\ \\ Such file is from server, and what it does is loging all the connections of the devices which connect to this server. \\ \\ From each connection of each device, it will show the license, and the action which is being done, either to send information or to receive. \\ \\ ==== DATABASE LOG==== \\ Its format is SV.12345678.yyyymmdd.txt\\ \\ Here, each and every operation made to a database level will be controlled, either of devices replica or selectivity .\\ \\ This is the Log necessary to review in order to check any kind of problem we have, since it will show the route that the system has take at the moment of the error. \\ \\ Errors can be problems with the selectivity because the criteria of the tables are wrong, errors with insert SQL or update due to lack of fields or bad names in the applications or performance problems.\\ \\ \\