WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/log app


This function was deprecated in Version 3.4 and has been removed from WordPress core as of Version 3.5. That means it has been replaced by a new function or is no longer needed. All code that uses this function must be converted to use its replacement if one exists. Use error_log instead.

Description

Logs messages to a file.

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

Usage

<?php log_app$label$msg?>

Parameters

$label
(string) (required) Type of logging to be done.
Default: None
$msg
(string) (required) Information describing the type of logging being done.
Default: None

Examples

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

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

Notes

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

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

to:

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

Source File

log_app() is located in wp-app.php.