advanced code snippet search
ryantxr on 06/14/12
logging
06/14/12 01:34am
2 people have marked this snippet as a favorite
knedleclacwebstudio
This is a really simple logger that can be thrown into any project.
class Debug{ function log($msg){ file_put_contents('logfile.log', strftime('%Y-%m-%d %T'). ': '.$msg. "\n", FILE_APPEND); }}// Usage: Debug::log('put something here');
Report this snippet Tweet
Comment:
You need to login to post a comment.