SimpleAS3Logger is a simple, flexible logging class in AS3 that comes with a simple php script to save important logging info in a mysql database.
SimpleAS3Logger is published under MIT License. That means you have the right to do whatever you want with it. For more info, scroll down to the bottom for License terms.
The documentation of this project can be found at http://rfaisal.github.io/SimpleAS3Logger/doc/ .
Run this command
git clone git://github.com/rfaisal/SimpleAS3Logger.gitor download as a zip.
Server setup: Run simple_as3_logger.sql on your database. Write down the database info in SimpleAS3LoggerServer.php
Client setup: Write the location of SimpleAS3LoggerServer.php file to LogWritter.dbServerURL variable.
Security (Optional): Change LogWritter.authString with a random string and write the same value to SimpleAS3LoggerServer.php's first if condition.
Possible extensions (for your project):
5.1 Add to the LoggingLevel class for more logging levels.
5.2 For each new logging level create a someLevelProcessingLogger class that extends ProcessingLogger abstract class.
5.3 Write more functions to LogWritter class for writing to more output areas like email, file, etc.
5.4 In the
log(...)function : change
...else if (next != null)...to
...if (next != null)...if you want all the higer level to process the same log, i.e., logging to Trace will log to all the upper levels.
Contribute to this project
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Contribute and Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
- Faisal Rahman : the original author of the project.
- Faisal Rahman, Gabriel Bucknall : contributors to this project.
- Wikipedia : concept of the Chain of responsibility pattern. Link: http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern
- Gabriel Bucknall : singleton implementation in as3. Link: http://blog.pixelbreaker.com/actionscript-3-0/as30-better-singletons
- Java Logging API.
Copyright (C) 2011 Faisal Rahman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.