LoxBerry::Web::logfile_button_html( %params );
Returns HTML code for a button to a webpage with all logfiles of your plugin. This function lists all logfiles of your plugin, and additionally accepts the NAME parameter from LoxBerry::Log to filter to a specific log group name.
This function is available starting with LoxBerry V1.2.1. If you use that function, set this minimum version in your plugin.cfg.
This feature only works with logfiles creates with the module LoxBerry::Log (Perl) or LBLog (PHP). It does not work for logfiles created without these LoxBerry SDK modules.
The function returns a string with HTML code to show a button to link to an own webpage, listing all logfiles of your plugin. Additionally, with the NAME parameter, you can filter to a specific logfile group name (e.g. 'Daemon') to only show that logfiles.
To give parameters to the function, use named parameters.
All parameter names are case-sensitive and written in capital letters.
NAME is the log group name used with LoxBerry::Log. If you have created a logfile with LoxBerry::Log::new( name => 'daemon'), use NAME => 'daemon' to list only logfiles of that group.
If you omit the NAME parameter, the list includes all logfiles of your plugin, independent of the log group name.
Package is not required in the case of a plugin. By default, this is (like with LoxBerry::Log) the $lbpplugindir-Variable.
Core-Developers have to use the PACKAGE parameter.
By default, LoxBerry labels the button with the language-specific "Show all logfiles" phrase.
To change the default label, use the LABEL parameter.
|DATA_MINI||x||By default, the function uses the jQuery Mobile tag data-mini="true". To have the full-sized button, send DATA_MINI => "0".|
|DATA_ICON||x||By default, the function uses the list icon from jQuery Mobile, "bars" (data-icon="bars"). To change the icon, send the icon name here.|
Returns a string that is the HTML code for the Logfile button. Simply print the result of the function to your webpage.
Returns undef, if the call failed.