Log messages to a node.js server for debugging


I made this while implementing background upload and download in iOS apps, in order to easily log messages when testing background completions. Suports both ios and macos.

It supports swift only, it can’t log from Objective-C. The log method supports the same arguments as the print method, so you can log as usual.


  1. Install Node.js:
  2. The Node.js server needs the ip module to work. It’s used for printing the local ip when the server starts. In order to install it, run:
npm install ip

From source

  1. Add Sources/NetworkLogger/NetworkLogger.swift to you project

Swift package manager

  1. Add the git url as a swift package


  1. Start the server by running node server.js from the terminal
  2. If using SPM, import NetworkLogger
  3. Set NL.serverIP to your desired IP address. The default is Make sure to include the port!
  4. Call NL.log("message") to log a message to the server
  5. A new entry should appear in the terminal running the server


View Github