Lesson 3 - MyLogger - Step 1


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. class MyLogger {
  2.  
  3. public function MyLogger(){
  4.  
  5. }
  6.  
  7. public function logDebug($sMsg){
  8. error_log("DEBUG: ". $sMsg);
  9. }
  10.  
  11. public function logError($sMsg){
  12. error_log("ERROR: ". $sMsg);
  13. }
  14.  
  15. public function logInfo($sMsg){
  16. error_log("INFO: ". $sMsg);
  17. }
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.