---
title: "EntityFrameworkLogger"
description: "Namespace: Lacuna.Pki.EntityFrameworkConnector"
canonical: "https://docs.lacunasoftware.com/api/Lacuna.Pki.EntityFrameworkConnector/EntityFrameworkLogger"
locale: "pt-BR"
product: "PKI SDK"
last_updated: "2026-06-02"
---

# EntityFrameworkLogger

**Namespace:** `Lacuna.Pki.EntityFrameworkConnector`  
**Assembly:** `Lacuna.Pki.EntityFrameworkConnector`  
_Class_

```csharp
public class EntityFrameworkLogger : ILogger
```

**Hierarquia:** [`object`](https://learn.microsoft.com/dotnet/api/system.object) → `EntityFrameworkLogger`

## Construtores

### `EntityFrameworkLogger(IPkiLogContext, LogLevels)`

```csharp
public EntityFrameworkLogger(IPkiLogContext dbContext, LogLevels minLevel = LogLevels.Info)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `dbContext` | [`IPkiLogContext`](https://docs.lacunasoftware.com/api/Lacuna.Pki.EntityFrameworkConnector/IPkiLogContext) |  |
| `minLevel` | [`LogLevels`](https://docs.lacunasoftware.com/api/Lacuna.Pki/LogLevels) |  |

---

## Métodos

### `Configure(IPkiLogContext, LogLevels)`

```csharp
public static void Configure(IPkiLogContext context, LogLevels minLevel = LogLevels.Info)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `context` | [`IPkiLogContext`](https://docs.lacunasoftware.com/api/Lacuna.Pki.EntityFrameworkConnector/IPkiLogContext) |  |
| `minLevel` | [`LogLevels`](https://docs.lacunasoftware.com/api/Lacuna.Pki/LogLevels) |  |

---

### `Flush()`

```csharp
public void Flush()
```

---

### `Log(LogLevels, string, string)`

```csharp
public void Log(LogLevels level, string message, string source)
```

**Parâmetros**

| Nome | Tipo | Descrição |
|---|---|---|
| `level` | [`LogLevels`](https://docs.lacunasoftware.com/api/Lacuna.Pki/LogLevels) |  |
| `message` | [`string`](https://learn.microsoft.com/dotnet/api/system.string) |  |
| `source` | [`string`](https://learn.microsoft.com/dotnet/api/system.string) |  |

---

## Membros herdados

[`ToString()`](https://learn.microsoft.com/dotnet/api/system.object.tostring), [`Equals(object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)>), [`Equals(object, object)`](<https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)>), [`ReferenceEquals(object, object)`](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [`GetHashCode()`](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [`GetType()`](https://learn.microsoft.com/dotnet/api/system.object.gettype), [`MemberwiseClone()`](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)
