Node.js library to integrate with the LogMeUp server. http://logmeup.com
This is a Node.js REST api wrapper for LogMeUp Server (http://logmeup.com).
npm install logmeup
To create a log file to start logging to, you must create a LogMeUp
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
var Logmeup = require'logmeup';var logger = LogmeupcreateLoggerhost: "mylogmeupserver.com" port: 7070 collection: "crabshack" app: "slickserver";
These methods are asynchronous.
//log some JSONlogger.logname: "JP" company: "Gitpilot";//log a stringlogger.log"This is a really bad error!";//optionally: inspect the servers responselogger.log"Bad error"console.log"The server said: " + responseText;if err != nullconsole.log"There was an error: " + errmessage;;
You can create a file named
logmeup.json in the base directory of your application or in the
config/ folder of your app.
The configuration file should look like this:
"host": "yourlogmeupserver.com""port": 7070"collection": "gitpilotllc""app": "server"
//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 timevar logger = require'logmeup'default;logger.log"yay!!!";
MIT License. See LICENSE for complete details.