Giter Club home page Giter Club logo

jsphplog's Introduction

JSPHPLog

PHP Server side implementation for JSNLog (http://js.jsnlog.com/)

Uses the PHP "error_log" function to save the log message from the JSNLog AJAX request to the default error log.

Example output:
[Tue Nov 26 15:43:22 2013] [error] [client xxx.xxx.xxx.xxx] [JSPHPLog]: This message sent from JSNLog, referer: http://client site/JSPHPLog/sample.php

Installation

To install, simply copy "jsnlog.logger.php","jsnlog.config.php", and "jsnlog.ini.php" files to the root directory of your website, then include "jsnlog.config.php" in the PHP templates you want logging enabled on. See "sample.php" for an example. "jsnlog.config.php" sets up the JSNLog Javascript automatically. Note: "jsnlog.config.php" assumes the JSNLog source javascript (jsnlog.min.js) is located in the same directory.

Configuration options

Default

The default configuration will setup a single Logger and Appender, and will send Logger messages to the default error log for your server (as referenced by the PHP "error_log" function). No additional configuration is needed.

Custom configuration (simple)

To customize the Appenders or Logger configuration settings, you can add appender options to the "jsnlog.ini.php" file. For instance, to change change the "batchSize" or "level" options for the default appender, set up the first "[appender]" section as shown below:
[appender]
 type="appender"
 options[url]="jsnlog.logger.php"
 ; add other appender options as well
 options[batchSize]=2
 options[level]=2000

jsphplog's People

Contributors

pnellesen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.