Field LogConfigFile
- Namespace
- YndigoBlue.Velocity.Engine
- Assembly
- YndigoBlue.Velocity.dll
Path to a custom log4net configuration file.
public static string LogConfigFile
Returns
- string
- Path to a custom log4net configuration file.
Remarks
When set, Velocity loads the specified log4net XML configuration file instead of its built-in default. This is a static property and must be assigned before creating any Manager instances to ensure the configuration is applied from the start of the application.
Manager.LogConfigFile = "path/to/log.config";
using (var m = new Manager(connection))
{
// Manager uses the custom log config from here
}
If this value is not set, Velocity falls back to a built-in default configuration that logs at DEBUG level (including all
SQL statements) to a file named velocity.log in the application's working directory. The default configuration
overwrites the log file on each run rather than appending to it. A copy of the default
config is available as a starting point for your own configuration.
Note
SQL statement logging only occurs when the log level is set to DEBUG. For production environments, consider setting the level to INFO or WARN to reduce logging overhead.
For full details on log levels, logger names, configuration examples, and recommended settings for development and production, see the Logging documentation.