Xyphra Logger

Xyphra is the official, native replacement for morgan in the XyPriss G3 ecosystem. Designed for high performance and Zero-Trust security, it offers features that standard JS loggers lack, such as native JSON support, automatic security redaction, and GDPR-compliant IP anonymization.

Fast

Native TypeScript implementation with zero overhead.

GDPR Compliant

One-click IP anonymization for privacy.

Auto-Redaction
Security-First

Redact sensitive headers (Authorized, Cookies) automatically.

Installation

bash
xfpm install xyphra

Quick Start

Configure Permissions

Grant the necessary privileges in your xypriss.config.jsonc:

jsonc
{
  "$internal": {
    "xyphra": {
      "permissions": {
        "allowedHooks": [
          "XHS.HOOK.HTTP.REQUEST",
          "XHS.HOOK.HTTP.RESPONSE",
          "XHS.PERM.SECURITY.SENSITIVE_DATA",
        ],
        "policy": "allow",
      },
    },
  },
}

Register as a Plugin

Register the XyphraPlugin using ServerOptions:

typescript
import { createServer } from "xypriss";
import { XyphraPlugin } from "xyphra";

const server = createServer({
  plugins: {
    register: [
            XyphraPlugin({
                anonymizeIp: true,
                immediate: false,
                stream: {
                    write(str: string) {
                        console.log(str);
                    },
                },
            }),
        ],
  }
});

Configuration

OptionTypeDescription
formatstring'json', 'dev', 'combined', etc.
anonymizeIpbooleanMask the last octet of IP addresses.
redactHeadersstring[]List of headers to mask as [REDACTED].

Developer Identity

Security Verified
Developer ID: ed25519:a58b17a3e46302dd3ae5538bc9b8b991c57f4c5fe2e7d8ac41803de818d947f4
This plugin is cryptographically signed. Always verify the signature during installation.
Plugin Permissions

Understand how to manage fine-grained permissions for your plugins.