Logging Javascript logs to server.
Logging javascript logs to server
You can install the jslogger using
npm install @nudjur/js-logger
Once installed you can import it as below in your js file
import jsLogger from "@nudjur/js-logger";
export const log = new jsLogger({
url: <URL>,
mode: <MODE>
time_ms: <TIME_MS>
});
To contribute to the repo you clone the repo and create a new branch and start making changes in src/index.js
.
package.json
version: "0.0.2" => "0.0.3"
npm run build
After this we can push all changes to branch and assign the maintainer for review
Once pr is merged maintainer will have to release to npm he can do so by
npm publish --access public
NOTE:- We will need to be logged in node repo for nudjur
{
log:[
{
UUID: '181393b0-8702-11e7-9ca6-a7e5a0572c550.8393907533887879', //sortable unique number
level : info/log/debug/error/user message/warn/exception/ajax,
message: 'message',
user: 'user if specified',
url: 'url where log happened',
host_url: 'host url(domain)',
misc: 'any extra data user specifies that is used while logging'
},
{}, {}, ....
]
}