> For the complete documentation index, see [llms.txt](https://easyauth.papelship.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easyauth.papelship.com/csharp-document/other-func/encrypted-logs.md).

# Encrypted Logs

The Encrypted Logs subsystem allows client applications to transmit secure audit trails, runtime telemetry, crash diagnostics, and suspicious tamper events to the authentication backend.

***

## Overview

Security events, anti-tamper alerts, and audit records generated during runtime are encrypted and transmitted securely to the server, allowing developers to inspect security violations and machine health from the admin dashboard.

***

## C# Implementation

{% tabs %}
{% tab title="Reporting Suspicious Activity" %}

```csharp
using System;
using qPapelEasyAuth;

public class TelemetryLogger
{
    public static void LogSecurityEvent(string description, string category, string severity)
    {
        // Category options : "tamper", "anti_debug", "hook", "vm", "general"
        // Severity options : "low", "medium", "high", "critical"
        bool logged = qPapelEasyAuth.qPapelEasyAuth.ReportSuspicious(description, category, severity);

        if (logged)
        {
            Console.WriteLine("[+] Security event encrypted and dispatched to server.");
        }
    }
}
```

{% endtab %}

{% tab title="Reporting Custom Diagnostics" %}

```csharp
public static void LogUserAction(string actionName, string metadataJson)
{
    qPapelEasyAuth.qPapelEasyAuth.SendAuditLog(actionName, metadataJson);
}
```

{% endtab %}
{% endtabs %}

***

## Dashboard Integration

All reported events and tamper alerts are logged under the application's audit history in the EasyAuth Web Dashboard, allowing administrators to filter events by severity, investigate suspicious activity, and take enforcement actions.

{% hint style="info" %}
Telemetry reporting operates asynchronously in the background and does not block the main application execution flow.
{% endhint %}
