{"id":12348,"date":"2011-02-28T13:53:17","date_gmt":"2011-02-28T13:53:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/logstore\/"},"modified":"2011-02-28T13:53:17","modified_gmt":"2011-02-28T13:53:17","slug":"logstore","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/logstore\/","author":165758,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.1.2","stable_tag":"0.1.2","tested":"3.1.4","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"LogStore","header_author":"Andre Wyrwa <andre@wyrfel.com>","header_description":"","assets_banners_color":"","last_updated":"2011-02-28 13:53:17","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":1341,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.1":"<p>Initial Release.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.2"],"block_files":[],"assets_screenshots":{"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1566869","resolution":"4","location":"plugin","width":680,"height":490},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1566869","resolution":"2","location":"plugin","width":152,"height":83},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1566869","resolution":"3","location":"plugin","width":675,"height":313},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566869","resolution":"1","location":"plugin","width":689,"height":271}},"screenshots":{"1":"This is LogStore's main admin screen. Here the user can activate or deactivate the logging for individual loggers.","2":"This is LogStore's admin menu. A submenu entry is created for each individual registered logger, no matter if active or not.","3":"This is the log view for a logger. Individual entries can be deleted, it can be sorted, uses pagination and the whole log can be wiped.","4":"This is the log entry view where you can view the individual log entries. The data is presented both in a nicely formatted and in raw form."}},"plugin_section":[],"plugin_tags":[734,908,1522,683],"plugin_category":[],"plugin_contributors":[129660],"plugin_business_model":[],"class_list":["post-12348","plugin","type-plugin","status-publish","hentry","plugin_tags-development","plugin_tags-log","plugin_tags-logging","plugin_tags-meta","plugin_contributors-wyrfel","plugin_committers-wyrfel"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/logstore.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/logstore\/trunk\/screenshot-1.png?rev=1566869","caption":"This is LogStore's main admin screen. Here the user can activate or deactivate the logging for individual loggers."},{"src":"https:\/\/ps.w.org\/logstore\/trunk\/screenshot-2.png?rev=1566869","caption":"This is LogStore's admin menu. A submenu entry is created for each individual registered logger, no matter if active or not."},{"src":"https:\/\/ps.w.org\/logstore\/trunk\/screenshot-3.png?rev=1566869","caption":"This is the log view for a logger. Individual entries can be deleted, it can be sorted, uses pagination and the whole log can be wiped."},{"src":"https:\/\/ps.w.org\/logstore\/trunk\/screenshot-4.png?rev=1566869","caption":"This is the log entry view where you can view the individual log entries. The data is presented both in a nicely formatted and in raw form."}],"raw_content":"<!--section=description-->\n<p>LogStore can be used to log (important) data from within your plugin.\nIt provides a simple interface to log entries and a friendly administration interface for viewing and managing the log entries.<\/p>\n\n<p>While LogStore can be used to log debug output or system events, it's main intention is to log more extensive data, such as:<\/p>\n\n<ul>\n<li>system emails sent your users<\/li>\n<li>data received from remote API calls<\/li>\n<\/ul>\n\n<h3>Usage<\/h3>\n\n<p>To use LogStore in your plugin, add the following line to your plugin's 'plugins_loaded' callback function:<\/p>\n\n<pre><code>if (class_exists('LogStore')) $this-&gt;log = new LogStore('slug', __('Title'));\n<\/code><\/pre>\n\n<ul>\n<li>The 'slug' should be a unique identifier for your logger.<\/li>\n<li>The 'Title' will be the title used in menu entries, options and page titles.<\/li>\n<\/ul>\n\n<p>Once that's done you can then start logging your data from anywhere within your plugin by using the following:<\/p>\n\n<pre><code>if (!empty($this-&gt;log)) $this-&gt;log-&gt;log(__('My log message'), $my_log_data, 'status', 'tag');\n<\/code><\/pre>\n\n<ul>\n<li>'My log message.' is any arbitrary message to describe your log entry.<\/li>\n<li>$my_log_data is the extended data you want to log. This can be either an array or string.<\/li>\n<li>'status' is one of 'none', 'ok', 'warn', 'critical' or 'fatal'.<\/li>\n<li>'tag' can be any kind of singular tag to  further classification to your log entries.add<\/li>\n<\/ul>\n\n<p>If you use LogStore in your plugin, you should check for it's presence in<\/p>\n\n<ul>\n<li>your 'plugins_loaded' callback<\/li>\n<li>your plugin activation callback<\/li>\n<\/ul>\n\n<p>You should either make LogStore use optional or notify the user that they need to install LogStore for your plugin to work properly.<\/p>\n\n<h3>Plugin Hooks<\/h3>\n\n<p>In the following hooks, <code>*myname*<\/code> stands for the name with which you instanciated the LogStore class.<\/p>\n\n<h4>Action Hooks<\/h4>\n\n<ul>\n<li><code>logstore_init-*myname*<\/code> - runs during the execution of WP's <code>init<\/code> action hook, passes a single boolean parameter indicating if logging is active or inactive for this logger<\/li>\n<\/ul>\n\n<h4>Filter Hooks<\/h4>\n\n<ul>\n<li><code>logstore_new_entry-*myname*<\/code> - runs during the creation of a new entry, passes a single array containing all values for that entry ('time', 'message', 'data', 'status' and 'tag')<\/li>\n<li><code>logstore_entry-*myname*<\/code> - runs before displaying an entry on screen, passes a single array containting all values for the entry ('time', 'message', 'data', 'status' and 'tag')<\/li>\n<li><code>logstore_format_entry_data-*myname*<\/code> - runs before displaying the formatted data on screen, passes the formatted data as string<\/li>\n<\/ul>\n\n<h3>Further Notes<\/h3>\n\n<p>Please note that the 'bulk actions' in the log viewer are currently not\nworking.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>logstore<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<\/ol>\n\n<!--section=faq-->\n<p>None, yet.<\/p>\n\n<!--section=changelog-->\n<h4>0.1.2<\/h4>\n\n<ul>\n<li>Readme fixes,<\/li>\n<li>move to new repository<\/li>\n<\/ul>\n\n<h4>0.1.1<\/h4>\n\n<ul>\n<li>Readme fixes<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"LogStore is a &#039;meta&#039; plugin that allows other plugins to log data easily.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/12348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=12348"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/wyrfel"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=12348"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=12348"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=12348"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=12348"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=12348"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=12348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}