TAILIEUCHUNG - Agile Web Application Development with Yii 1.1 and PHP5 phần 10

Thêm một phương pháp điều khiển hành động mới gọi là actionAdduser () lớp ProjectController, và thay đổi accessRules () method để đảm bảo nó có thể truy cập bởi các thành viên xác thực. Phương pháp này hành động mới có trách nhiệm để làm cho cái nhìn mới để hiển thị các hình thức và xử lý các bài viết trở lại khi hình thức là | Chapter 13 If we comment out our global application debug variable defined in and refresh the page we ll notice that nothing was logged. This is because this system-level debugging information level logging is accomplished by calling Yii trace which only logs the message if the application is in this special debug mode. We can log messages using one of two static application methods Yii log message level category Yii trace message category As mentioned the main difference between these two methods is that Yii trace logs the message only when the application is in debug mode. Categories and levels When logging a message we need to specify its category and level. The category is represented by a string in the format of which resembles the path alias. For example if a message is logged in our application s Sitecontroller class we may choose to use the category . The category is there to provide extra context to the message being logged. In addition to specifying the category when using Yii log we can also specify a level for the message. The level can be thought of as the severity of the message. You can define your own levels but typically they take on one of the following values Trace This level is commonly used for tracing the execution flow of the application during development. Info This level is for logging general information and it is the default level if none is specified. Profile This level is to be used with the performance profile feature which is described below. Warning This level is for warning messages. Error This is level for fatal error messages. 311 Iteration 10 Production Readiness Adding a login message log As an example let s add some logging to our user login method. We ll provide some basic debugging information at the beginning of the method to indicate the method is being executed. We ll then log an informational message upon a successful login as well as a warning message if the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.