Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

logmeup

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logmeup

Node.js library to integrate with the LogMeUp server. http://logmeup.com

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js - LogMeUp

About

This is a Node.js REST api wrapper for LogMeUp Server (http://logmeup.com).

Install

npm install logmeup

Using

To create a log file to start logging to, you must create a LogMeUp collection/app pair.

If you're developing an app named 'Slick Server' and you worked for the company 'Crab Shack', you might name your app slickserver and your collection crabshack.

Creating Logger

var Logmeup = require('logmeup');
var logger = Logmeup.createLogger({host: "mylogmeupserver.com", port: 7070, collection: "crabshack", app: "slickserver"});

Logging Data

These methods are asynchronous.


//log some JSON
logger.log({name: "JP", company: "Gitpilot"});

//log a string
logger.log("This is a really bad error!");

//optionally: inspect the servers response
logger.log("Bad error", function(error, responseText){
  console.log("The server said: " + responseText);
  if (err != null) {
    console.log("There was an error: " + err.message());
  }
});

Default Logger

You can create a file named logmeup.json in the base directory of your application or in the config/ folder of your app.

Configuration File

The configuration file should look like this:

{
    "host": "yourlogmeupserver.com",
    "port": 7070,
    "collection": "gitpilotllc",
    "app": "server"
}

Using Default Logger

//will autoload logmeup.json
//this way you can put this at the top of all your modules in your app without having to recreate the logger each time
var logger = require('logmeup').default;

logger.log("yay!!!");

License

MIT License. See LICENSE for complete details.

Copyright (c) 2012 JP Richardson Twitter / Google+

Keywords

log

FAQs

Package last updated on 01 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts