v1.0.8Published 3 years ago


quave:logs is a Meteor package that allows you to send logs to loggly, from client and server.


Every application needs log and we take advantage of Meteor methods to also send logs from the client.

We don't load heavy dependencies in the client instead we use Meteor methods to send the logs from the client to the server and then to the final destination and to the server console.

We believe we are not reinventing the wheel in this package but what we are doing is like putting together the wheels in the vehicle :).


meteor add quave:logs
meteor npm install winston-loggly-bulk


You need to configure this package using your settings.

You have two important fields:

  • sendToServer: define the levels that are going to the server from client logs
  • loggly: token, subdomain and tags to configure loggly. You can also provide an array of Strings messagesToSkip then if the log contains this message it won't be sent.
  "public": {
    "env": "DEVELOPMENT",
    "packages": {
      "quave:logs": {
        "sendToServer": [
        "loggly": {
          "token": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
          "subdomain": "yourdomain",
          "tags": [

We have three methods in the logger object:

  • info
  • warn
  • error

they all receive:

  • message: text
  • error: error object
  • tags: array of tags

Now you are ready to use quave:logs, as we don't want to include server dependencies in the client we need to use a different import in the client.

See one example for server and one for client below.

On server

1import { logger } from 'meteor/quave:logs/logger';
4    options,
5    error => {
6      if (error) {
7        logger.error({
8          message: `Error while sending email=${JSON.stringify(options)}, to=${
9            options.to.email
10          }`,
11          error,
12          tags: ['email'],
13        });
14      }
15    }

On client

1import { loggerClient } from 'meteor/quave:logs/loggerClient';
3if (Meteor.userId) {
4  loggerClient.info({message: `logged user id ${Meteor.userId}`});

If you have your environment on Meteor.settings.public.env it will be sent as a tag automatically.


We are using loggly because we like this tool then for now we only support sending logs to loggly. If you don't want to send to anywhere, you can just omit this setting. Also, if you want to support more tools you can submit a PR.