Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to manage error log in cakephp in 2.4.1 version?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 411
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to manage error log in cakephp in 2.4.1 version?

    If you want to create error log file in your CakePHP web application so firstly you have to search
    location to error.log file in your application.

    you can see location of error.log file below line

    /app/tmp/logs/error.log

    In this file you can create error file by using keyword CakeLog::write() method.

    syntax of CakeLog::write() method:

    CakeLog::write('error', 'massage');

    you can see below example

    <?php
    
         try {
        //code will be  here
        } catch(Exception $e) {
        CakeLog::write('error', $e->getMessage());
        }
    
    ?>

    You can see your log under '/app/tmp/logs/ directory

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: