log_app()记录一个日志到文件中

目录

描述

Logs messages to a file.

You can log all atom actions within wordpress by simply calling this function

log_app() 描述

用法

<?php log_app$label$msg?>

log_app() 用法

参数

$label

(string) (必填) Type of logging to be done.

默认值: None

$msg

(string) (必填) Information describing the type of logging being done.

默认值: None

log_app() 参数

示例

Assuming we're within one the wp-app.php

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

//  This would log that the function get_service was called
function get_service() {
   log_app('function','get_service()');
}

log_app() 示例

注意

In order for logging to work, you will need to edit wp_app.php and modify the global variable app_logging line 32 from:

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

/**
 * Whether to enable Atom Publishing Protocol Logging.
 *
 * @name app_logging
 * @var int|bool
 */
$app_logging = 0;

to:

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

/**
 * Whether to enable Atom Publishing Protocol Logging.
 *
 * @name app_logging
 * @var int|bool
 */
$app_logging = 1;

log_app() 注意