node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



const { Server } = require('@namics/remlog-server');

The server package is the main core for the remote logging process and provides you the API needed to trace logs immediately. There are a few endpoints you should know first:

  • / will give you an overview about all the logs happend in the current process
  • /info will show you the package name and version of the server instance
  • /trace is a HTTP POST route and will take the JSON body as trace payload
  • /tracer.jpg is a HTTP GET API and is implement by the @namics/remlog-browser-client package to provide a cross-browser method to log messages
  • /logs.json will return an array of JSON objects representing all your logs
  • /logs/<log-id>.json will show you a single log entry in JSON format


new require('@namics/remlog-server')
        port: 8123,
        transport: `@namics/remlog-transports/Console`, // default
        cors: ['*'] // default
new require('@namics/remlog-server')
        port: 9001,
        transport: `@namics/remlog-transports/FileSystem`,
        cors: ['', ''],
        // enables SSL on the server
        ssl: {
            key: './ssl/my-domain/key.pem',
            cert: './ssl/my-domain/cert.pem',
            passphrase: 'k12Sh1$£1e3^7VcaR#t'

Sending a trace to the Server via AJAX

This uses the HTTP POST JSON API from the server exposed under the /trace route.

import axios from 'axios';
import { LOGLEVEL, getTraceUrl } from '@namics/remlog-utils';
const serverConfig = {
    host: '',
    port: '<your-server-port>'
};, {
    shortMessage: 'Hey you!',
    fullMessage: 'Blablabla',
    level: LOGLEVEL.INFO

Review the Changelog