Beschreibung
Dieses Plugin ist von dem nocht länger unterstützten WordPress Logging Service abgeleitet.
Ungeachtet dessen ist es nicht damit kompatibel, und es existiert auch kein Upgrade-Pfad vom einen zum anderen.
Zusatzfunktionen
- Vom Plugin selbst werden keine Log-Einträge generiert, alle haben ihren Urprung in externen API-Aufrufen
- Organisation der Log-Einträge in frei benennbaren Kategorien
- Schweregrade
- Freitext-Nachrichten
- Einträge können als gesehen markiert werden und von der wiederholten Anzeige ausgenommen werden
- Filtern nach dem kleinsten Schweregrad
- Sortieren nach Datum, Kategorie, Benutzername, Schweregrad oder Blogname (in Multisite-Installationen)
- Zugriff auf die Logseite kann nach Benutzerrollen gesteuert werden
API
Konstanten
Check to test if the plugin is active:
CLGS = true
Defined severity levels:
CLGS_NOSEVERITY = 0
CLGS_INFO = 1
CLGS_NOTICE = 2
CLGS_WARNING = 3
CLGS_ERROR = 4
CLGS_FATALERROR = 5
Functions
clgs_is_registered ( $category )
string $category
returns true
if $category
is registered.
clgs_register ( $category, $description )
registers $category
as a log category. $description
will be shown in the
management page.
It is good practice to use unique categories for each plugin that publishes
log messages.
string $category
At most 190 (unicode) charactersstring $description
can contain HTML same as comments (filtered by
wp_kses_data)
returns false
if the category is already registered or it is too long.
clgs_clear ( $category )
deletes all log entries of $category
.
string $description
existing category
returns number of deleted entries or false
if action failed.
clgs_unregister( $category );
deletes all log entries and then removes $category
.
string $description
existing category
returns false
if false if action failed.
clgs_log( $category, $text, $severity = null, $user = null, $blog_id = null, $date = null );
writes a new log entry in the specified category
string $description
a registered category namestring $text
the logged message, can contain HTML same as comments (filtered
bywp_kses_data
)int $severity
one of defined severity levels (see above); if missing defaults to
CLGS_NOCATEGORYint | string | WP_User $user
user id, slug or WP user object are aceptable; if missing
defaults to current user (or a placeholder if none is logged in)int $blog_id
blog id; if missing defaults to current blogint | double | string $date
a UNIX timestamp or a string recognized bystrtotime()
;
if missing defaults to current time
returns false
if entering the log failed.
Installation
- Install from Plugins -> Add New
- Or download the .zip and extract to
wp-content/plugins
- Activate the plugin from the Plugins menu. In Multisite installations, feel free
to activate as a network plugin or to leave it to individual blogs. - Go to Settings -> Custom Logging Service for the next steps
Einstellungen
- Minimum severity for notification: You will see the number of unseen log entries
of that level or above next to the menu entry for the log page. - Default minimum severity filter: Which severity levels you will see in the log page.
You can change this filter later on the page. - Roles that can manage Custom Logs: Decide who can see and interact with the log page.
- Log entries per page: Set the number of entries per page.
Generating Log messages
This plugin does not generate any log messages by itself. You need other plugins to
interact with it through the API; see the API section for details.
FAQ
- Where are the logs?
-
Find them under Dashboard -> Selected Logs.
- I can’t find the option to add roles for log management!
-
If the plugin has been installed network-wide in Multisite, only the Super Admin
has access to the logs. Sorry, I don’t understand role management in Multisite.
Rezensionen
Für dieses Plugin gibt es keine Rezensionen.
Mitwirkende & Entwickler
„Custom Logging Service“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:
Mitwirkende„Custom Logging Service“ wurde in 1 Sprache übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.
Übersetze „Custom Logging Service“ in deine Sprache.
Interessiert an der Entwicklung?
Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.
Änderungsprotokoll
1.0.3
Compatibility with WP 4.7
1.0.2
Compatibility with WP 4.6
1.0.1
Compatibility with WP 4.5
1.0.0
First version, derived from zaantar’s
WordPress Logging Service