###### Contents


200.3.23 years ago4 years agoMinified + gzip package size for @namics/remlog-server in KB



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: ['my-domain.com', 'remote.namics.com'],
        // 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>'

axios.post(getTraceUrl(serverConfig), {
    shortMessage: 'Hey you!',
    fullMessage: 'Blablabla',
    level: LOGLEVEL.INFO

Review the Changelog

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.