The following configuration settings are availlable in ApacheLogToDB.conf.xml file:
  • dbType - Database system. Supported values are sqlsrv (Microsoft SQL Server) or mysql (MySQL). Default is sqlsrv.
  • dbHost - Address or name of the database instance to which to connect. Default is localhost. Please, note that if SQL Server was installed as a named instance, dbHost must be specified as .\<sqlServerName> or <machineName>\<sqlServerName>. This particularly concerns SQL Server Express instances. Port can be specified after a colon like this: localhost:3306 or 192.168.0.14:8306
  • dbName - Name of the database in which log records must be stored.
  • dbTable - Name of the table in which log records must be stored.
  • dbUser - Login name of the database user. This user must have sufficient rights to create table, to write data into that table and (for SQL Server users) to use "dbo" scheme. To utilize Windows authentication, please, use the following format <myDomain>\<myUsername>;Integrated Security=SSPI
  • dbPassword - Database user's password.
  • apacheLogFormat - Log format string like |%h|%l|%u|%t|%r|%>s|%b, that was specified in Apache's configuration file.
  • maxParamLength - If any log record's parameter exceeds this number of characters, the overhead will be cut off. Default is 255. If maxParamLength is set to 0, no cutting occurs.
  • The following optional parameters are also available:
    • apacheTimestampFormat (optional) - The format of timestamp %t, that Apache uses in it's log. Default is [dd/MMM/yyyy:HH:mm:ss zz00] and normally it doesn't change unless a user does change it explicitly in Apache's configuration file. Use .NET's standard date and time format strings to define new timestamp if required.
    • dbConnectTimeout (optional) - Number of seconds to wait while trying to establish a connection before terminating the attempt and generating an error. Default is 10.
    • errorFile (optional) - The path to and the name of the file, to which ApacheLogToDB will record it's internal errors, e.g. C:\Logs\ApacheLogToDb.error.log. If it's not specified, the file ApacheLogToDb.error.log will be automatically created in Apache's \bin subdirectory or Apache's main directory.
    • longQueriesFile (optional) - If maxParamLength limit is specified, every log record's parameter exceeding that limit will be truncated. Such truncated records can be saved into file.
    • dumpFile (optional) - The path to and the name of the file, to which ApacheLogToDB will dump all records received from Apache, e.g. C:\Logs\ApacheLogToDb.dump.log. If it's not specified, no dumping will occur. It's useful for debugging purposes only.
    • profilingFile (optional) - The path to and the name of the file, to which ApacheLogToDB will record profiling information. It's useful for debugging purposes only.

Save the configuration file. If some configuration settings contain non-latin characters, make sure that configuration file is encoded using UTF-8 encoding, without byte-order mark.


Last edited Aug 23, 2013 at 10:10 AM by CodeDriller, version 1

Comments

No comments yet.