The log file configuration is specified in the appSettings.xml file.
For example:
<add key="Db.LogFileName" value="c:\temp\gn4.log" />
<add key="Db.LogSplit" value="1h" />
<add key="Db.LogEvents" value="All" />
The GN4 logging parameters are:
LogFileName
The full name of the main log file and/or the path where storing the auxiliary log XML files. If missing or empty then no logging occurs at all.
LogSplit
The parameter by which splitting the log files (by size or by time). The syntax of this string should be, for example, “2d”, “3w”, “45Mb”, “1h” where h=hour, d=day, w=week, m=month and mb = megabyte. If this key is missing or set to 0 then the main log file is not split at all.
Note that the log file is split from the beginning of the time period, that is at 0 minute of an hour, day, month, etc.. For example, when a hourly (“1h” = 1 hour) splitting is configured, the new log file is created at the 10:00, even if the old file was created at 09:34. The next file at 11:00 and so on.
LogEvents
This flag specifies the events to log.
More parameters can be specified together at the same time as a comma-separated string. For example, to log all the XML resulting from a XSL transformation we have to set LogEvents to "ObjectCompute, ObjectUICompute".
•All: enables logging off all events.
•Alerts: enables alerts logging.
•Errors: Logs all error events: composition of 'ObjectComputeErr','ObjUIComputeErr','ImportExportErr', 'PublishAutoFillErr' and 'LogEvent.WorkflowErr'.
•Exalead (Main log): Logs data about Exalead index operations.
•ImportExportErr (auxiliary log): Logs data about errors occuring while executing XML import and export (e.g. the XML input for an XSL transformation that fails).
•Login (main log): Logs the user login/logout events and the server startup/shutdown events.
•Main: enables SQL and Login logging Logs (the SQL commands and the login/logout events) in the main log file.
•None: special value for No events
•ObjectComputeErr (auxiliary log): Logs the XML input and output for the XSL transformation used for the automatic computation of an object attributes when an error occurs (either XSL transformation error or object import error).
•ObjectCompute (auxiliary log): Logs the XML input and output for the XSL transformation used for the automatic computation of an object attributes.
•ObjUIComputeErr (auxiliary log): Logs the XML input and output for the XSL transformation used for the initialization and automatic computation of object attributes in a form when an error occurs (either XSL transformation error or object import error).
•ObjUICompute (auxiliary log): Logs the XML input and output for the XSL transformation used for the initialization and automatic computation of object attributes in a form.
•ObjectValidation: enables logging of objects validation
•PublishAutoFill (auxiliary log): Logs the XML input and output for the XSL transformation used for the auto-fill of publishing destinations.
•PublishAutoFillErr (auxiliary log): Logs data about errors occuring while executing the XSL transformation used for the auto-fill of publishing destinations.
•PublishValidateObject (auxiliary log): Logs the XML input and output for the XSL transformation used for the validate object.
•PublishValidateObjectErr (auxiliary log): Logs data about errors occuring while executing the XSL transformation used for the validate object.
•ServerCache: enable ServerCache logging.
•Sql (main log): Logs the SQL commands.
•SqlFullText: enables logging of SQL full-text searches (version 2.0 or newer)
•Triggers: enables triggers logging.
•Workflow (auxiliary log): Logs the XML input and output for the XSL transformation used during a workflow execution.
•WorkflowErr (auxiliary log): Logs data about errors occuring while executing the XSL transformation used during a workflow execution.
•GNQuery (since 2.1): logs GNQuery operations
Notes
•In general, the loggable events can be specified in the LogEvents key specifying the events as a comma-separated string of names and aggregates names. For example:
<add key="Db.LogEvents" value="Login,Sql,Errors" /> to log the login/logout events and the Sql commands in the main log file
<add key="Db.LogEvents" value="Main" /> to log the SQL commands and the login/logout events in the main log file. The auxiliary files are not created.
•If the LogEvents key is missing, then the default logged events are: ‘Main, Errors’
•If you want to disable logging, simply remove or comment the LogFileName key from the Web.config file.