- Seme Framework
- version 4.0.3
- Requirements
- Download & Install
- Configuration
- Tutorials
- URI Routing
- Constants
- Global Variables
- Model
- View
- Controller
- cdn_url
- config
- constructor
- getAdditional
- getAdditionalBefore
- getAdditionalAfter
- getAuthor
- getCanonical
- getContentLanguage
- getDescription
- getIcon
- getJsContent
- getJsFooter
- getJsReady
- getKey
- getKeyword
- getLang
- getRobots
- getShortcutIcon
- getThemeElement
- getTitle
- input
- lib
- load
- loadCss
- loadLayout
- putThemeContent
- putJsContent
- putJsFooter
- putJsReady
- putThemeContent
- render
- resetThemeContent
- session
- setAuthor
- setCanonical
- setContentLanguage
- setDescription
- setIcon
- setKey
- setKeyword
- setLang
- setShortcutIcon
- setTheme
- setTitle
- Library
- CLI (command line interface)
- Core
- Issue
- Deployment
Seme Log
The seme_log
library is for logging some text or result into file log. Seme log will create and put new file seme.log in root project or in app/cache/seme.log depending directory access on your script.
How to use
First we have to loaded library by using library loaded:
$this->lib('seme_log');
You can put libary loader in constructor of controller or on each method in your controller.
Basic Usage
Seme Log only have one method called write for writting log into file log. Here is the example:
Class Product extends SENE_Controller{
public function __construct(){
$this->lib('seme_log');
}
public function index(){
$this->seme_log->write("Produk::index called");
}
}
And then this is the result if we open file seme.log
2019-08-06 10:22:22 - Produk::index called
2019-08-06 10:22:25 - Produk::index called
Advanced Result
If you used *nix Operating System, you can tail -f seme.log
for realtime view log.