Skip to content

Commit

Permalink
README/help updates
Browse files Browse the repository at this point in the history
  • Loading branch information
drmikecrowe committed Feb 21, 2015
1 parent a532ef7 commit 9ea4d07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 30 deletions.
32 changes: 6 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CMSMonolog
============

This project embeds [Monolog 1.10.x-dev](https://github.com/Seldaek/monolog) into CMS Made Simple. From the Monolog website:
This project embeds [Monolog](https://github.com/Seldaek/monolog) into CMS Made Simple. From the Monolog website:

> Monolog sends your logs to files, sockets, inboxes, databases and various web services. See the complete list of handlers below. Special handlers allow you to build advanced logging strategies.
Expand All @@ -12,7 +12,7 @@ For support, please submit [an issue](https://github.com/drmikecrowe/cmsms_monol
TARGET AUDIENCE
================

This module will benefit developers. Standard CMSMS installations will NOT benefit from this, as standard CMSMS logs will go to Monolog.
This module will benefit developers. Standard CMSMS installations will NOT benefit from this, as standard CMSMS logs will not go to Monolog.

CAUTION
========
Expand All @@ -38,32 +38,12 @@ FEATURES
USAGE
--------

### Method #1 (local instance):
### Static Methods:

use Monolog\Logger;
MLog::d(channel, debug message, variable1, variable2, ...);
example
MLog::i(__METHOD__,"This is my info logging message",$params);

/** @var CMSMonolog $mlog */
$mlog = cmsms()->GetModuleInstance("CMSMonolog");
if ( $mlog ) {
$level = (IS_DEV ? Logger::DEBUG : Logger::INFO);
$this->generalLogger = $mlog->GetDatabaseLogger($this->GetName(),$level);
}

(snip)

$this->generalLogger->addDebug(__METHOD__,"This is my debug logging message");
or
$this->generalLogger->addWarning(__METHOD__,"This is my warning logging message");

### Method #2 (Static Class):

MLog::d($channel,$message,$context); // add a debug message
or
MLog::i("General","This is my info logging message,__METHOD__);

### Method #3 (Replace CMSMS audit function):

MLog::audit($uid, $this->GetName(), "User $username/$uid was created from referral $sponsorname");


SCREENSHOTS
Expand Down
7 changes: 3 additions & 4 deletions lang/help.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h3>Module
Purpose:<br>
</h3>
<p>This module is for developers only.&nbsp; <br></p>
<p>This module will benefit developers. Standard CMSMS installations will NOT benefit from this, as standard CMSMS logs will not go to Monolog.<br></p>
<p>Integrates https://github.com/Seldaek/monolog into CMS Made Simple</p>
<h3>Installation</h3>
<p>Post install, Monolog must be installed using <a href="https://getcomposer.org/">Composer</a>. Two choices:</p>
Expand Down Expand Up @@ -78,10 +78,9 @@ <h3>How Do I Use It</h3>
<h3>What Parameters Does It Take</h3>
<p>None</p>
<h3>Support</h3>
<p>As per the GPL, this software is provided as-is. Please read the text of the license for the full disclaimer.</p>
<p>This software is provided as-is. Please read the text of the license for the full disclaimer.</p>
<h3>Copyright and License</h3>
<p>Copyright © 2015, Mike Crowe<span class="Apple-converted-space">&nbsp;</span><a href="mailto:drmikecrowe@gmail.com">
&lt;drmikecrowe@gmail.com&gt;</a>. All Rights Are Reserved.</p>
<p>This module has been released under the<span class="Apple-converted-space">&nbsp;</span><a
href="http://www.gnu.org/licenses/licenses.html#GPL">GNU Public License</a>. You must agree to this license
<p>Monolog is licensed under the MIT License - see the `LICENSE` file for details. You must agree to this license
before using the module.</p>

0 comments on commit 9ea4d07

Please sign in to comment.