ご注意ください

このWikiに書かれた情報は、Risoluto1.x系に関するものです。 Risoluto1.x系は開発が終了しており、現在Risoluto2.x系の開発が進められています。

最近の更新

2012-10-11
2012-04-05
2012-03-27

Latest File Release

risoluto (1.3.1)2011-09-27 15:41
risoluto-upgrade (1.3.0 to 1.3.1)2011-10-24 15:51
simpleblog (1.4.0)2011-10-19 14:50
simpleblog-upgrade (1.2.0 to 1.3.0)2011-07-21 23:13
simplepage (1.3.0)2011-10-19 14:45
simplepage-upgrade (1.1.0 to 1.2.0)2011-07-21 23:15

Wikiガイド

サイドバー

Return

Class reference: RisolutoLog Class(risoluto_log.php)

Abstraction of the class

This class provides general log output function. Log output is named as “risoluto_YYYYMMDD.log” and stored under RISOLUTO_LOGS. There is concept of log level and it does not output below specified level written in risoluto.ini (less urgent ones). This enables not to output by only one setting in real operation even lots of log output logics are included for the purpose of debug.

How to generate class instance

  1. require_once( RISOLUTO_FUNC . 'risoluto_log.php' );
  2. $instance = RisolutoLog::singleton();

What this class depends on

  • RisolutoConf class

Content of the class

Class variable

$obj_instance

Scopeprivate(static)
Typeobject
UsageSince this is singleton pattern, it keeps the instance itself.

$str_logPath

Scopeprivate(static)
Typestring
Usageit keeps full path to the output log file.

$arr_loglevel

Scopeprivate
Typearray
Usageit keeps log level information.

Defined contents are as below:

  1. array(
  2. "stop" => -1
  3. , "emerg" => 0
  4. , "alert" => 1
  5. , "crit" => 2
  6. , "error" => 3
  7. , "warn" => 4
  8. , "notice" => 5
  9. , "info" => 6
  10. , "debug" => 7
  11. );

Class method

__construct()

Scopeprivate
Parameternone
Return valuenone
Usageconstructor of this class (no actual processing)

__clone()

Scopeprivate
Parameternone
Return valuenone
Type of return valuenone
Usageclone method of this class (no actual processing)

singleton()

Scopepublic(static)
Parameternone
Return valuenone
Type of return valuenone
Usagereturn instance of this class after generating it by singleton pattern

logging()

Scopepublic
Parameterstring $loglvl log level (stop|emerg|alert|crit|error|warn|notice|info|debug)/string $logmes message to output
Return value result of function execution ( true: normal termination / false: abnormal termination )
Type of return valueboolean
Usageto output message specified by the parameter in log level specified by the parameter.
  1. $result = $instance->logging( 'debug', 'DEBUG LOG' );
  2. var_dump( $result );

Return