New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openjslog

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openjslog

OpenJSLog is a sophisticated Logging utility with Timestamping and Log-Analysis

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

OpenJSLog

OpenJSLog is a sophisticated Logging utility with Timestamping and Log-Analysis.

It is based on JSON-Explorer by kadjar: https://github.com/kadjar/json-explorer

Now with Node.JS support & MIT Licensed!

Usage

  • Node.JS:

A simple npm install openjslog within you commandline (or adding a dependency to openjslog in your package.json followeg by a simple npm install) and a var Log = require('openjslog'); in your application suffices to be able to use Log(myAwesomeVariable);

Available methods: (Log will be the name of your variable!)

  • Log(log, force, spit, emptyAfterSpit)

  • Log.Group(groupName, collapsed)

  • Log.GroupEnd()

  • Log.toString()

  • Browser:

    Simply include the file somewhere in your html and use one of the following available methods:

    • Log(log, force, spit, emptyAfterSpit)
    • Log.group(groupName, collapsed)
    • Log.groupEnd()
    • Log.toString()
    • Log.setDevmode(value)

Code-docs:

Log(log, force, spit, emptyAfterSpit):

Log: Logs the given input with a timestamp

  @param log               The Object to log.
  @param force             Whether or not to force a log to console.
  @param spit              Output the Logbuffer to the Console
  @param emptyAfterSpit    Wether or not to empty the Logbuffer after outputting it.

Log.setDevmode(value): (Unavailable in Node.JS, legacy available via OJSLsetDevmode(...))

Log.setDevmode: Sets the devmode to either true or false

  @param value            true or false

Log.group(groupName, collapsed): (legacy available via OJSLGroup(...))

Log.group: Marks the beginning of a group of logs

  @param groupName       The name of the group
  @param collapsed       Collapse the Group?

Log.groupEnd(): (legacy available via OJSLGroupEnd())

Log.group: Marks the end of a group of logs

Log.toString():

Log.toString: Return the contents of the LogBuffer as JSON

  @returns string        Contents of the LogBuffer as JSON

Keywords

OpenJSLog

FAQs

Package last updated on 22 Apr 2015

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