snytkine / LampCMS

Open source Question and Answer program similar to StackOverflow and Quora in PHP + MongoDB. Follow @snytkine on Twitter

Home Page:http://support.lampcms.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update logger

snytkine opened this issue · comments

Rewrite logger to have these features:
create new log per day
use prefix for log name if special header is present in request
create log viewer
log viewer must only be available to logged in admins or developers (may need to add developers to ACL)
log viewer will also use special header to find correct log file.
initialize new log file in index.php or in !inc.php by setting LOG_PREFIX constant, LOG_FILE constant
these constants may be used in Log.php
Update all print_r statements in logger with calls to
_j() or j() wich will do json_encode
_j() will do nothing if log level is NOT debug. This will save all the json_encode calls!

in log viewer add js to open selected json string in new window parsed in pretty formatted.