Class ConsoleLoggingProvider
An logging provider that outputs Npgsql logging messages to standard error.
Implements
Inherited Members
Namespace: Npgsql.Logging
Assembly: Npgsql.dll
Syntax
public class ConsoleLoggingProvider : INpgsqlLoggingProvider
Constructors
ConsoleLoggingProvider(NpgsqlLogLevel, Boolean, Boolean)
Constructs a new ConsoleLoggingProvider
Declaration
public ConsoleLoggingProvider(NpgsqlLogLevel minLevel = NpgsqlLogLevel.Info, bool printLevel = false, bool printConnectorId = false)
Parameters
Type | Name | Description |
---|---|---|
NpgsqlLogLevel | minLevel | Only messages of this level of higher will be logged |
Boolean | printLevel | If true, will output the log level (e.g. WARN). Defaults to false. |
Boolean | printConnectorId | If true, will output the connector ID. Defaults to false. |
Methods
CreateLogger(String)
Creates a new Npgsql.Logging.ConsoleLogger instance of the given name.
Declaration
public NpgsqlLogger CreateLogger(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
NpgsqlLogger |