Send Logs


Send Application Logs to Pinghome


Pinghome allows you to collect, monitor, and analyze structured logs from any application in real-time. Whether you're running services in production or debugging locally, centralized logging helps you gain visibility into your system’s behavior and track important events.



This section provides implementation guides for sending logs to Pinghome using HTTP-based log ingestion. Each guide shows how to configure your logging tool, format and structure log data, and authenticate requests using secure Bearer tokens.



Supported Environments


  • .NET using NLog with NLog.Targets.Http for direct API log forwarding
  • Node.js (integration support coming soon)
  • Python (integration support coming soon)
  • Java (integration support coming soon)


Key Features


  • πŸ” Secure log delivery using Bearer token authentication
  • πŸ“¦ Support for structured JSON logs
  • 🧩 Enrich logs with metadata such as user_id, context, or extra
  • πŸ“„ Fully customizable logging format and log level control


Choose your language from the left navigation menu to get started.

Send Logs to Pinghome using NLog (.NET)

This guide shows how to send logs to Pinghome from your .NET application using NLog. You'll use HTTP targets to push logs with structured context like extra, user_id, and any other fields.


🧰 Requirements


  • .NET version 5 or later
  • Pinghome API Token
  • Log Group URL from the Pinghome Dashboard

πŸ“¦ Install Packages

βš™οΈ Configure NLog

πŸš€ Log Example

βœ… Sample JSON Output

πŸ§ͺ Troubleshooting

IssueSolution
No logs in PinghomeCheck if your token and log group URL are correct.
Invalid layout or JSONEnsure extra is serialized correctly with JsonSerializer.Serialize or proper serialization.
Nothing is sent to HTTPCheck internal-nlog.log for errors.
Config not workingEnsure NLog.config is set to CopyToOutputDirectory.

πŸ“˜ See Also