in the format returned by parse_logline (see below). By default all actions
will be returned, but you can limit it to a subset using by setting the
following parameters :
-only-user - Only return actions by this Webmin user
-only-module - Only actions in this module
-start-time - Limit to actions at or after this Unix time
-end-time - Limit to actions at or before this Unix time
+
+=item only-user - Only return actions by this Webmin user.
+
+=item only-module - Only actions in this module.
+
+=item start-time - Limit to actions at or after this Unix time.
+
+=item end-time - Limit to actions at or before this Unix time.
=cut
sub list_webmin_log
Converts a line of text in the format used in /var/webmin/webmin.log into
a hash ref containing the following keys :
-time - Unix time the action happened
-id - A unique ID for the action
-user - The Webmin user who did it
-sid - The user's session ID
-ip - The IP address they were logged in from
-module - The Webmin module name in which the action was performed
-script - Relative filename of the script that performed the action
-action - A short action name, like 'create'
-type - The kind of object being operated on, like 'user'
-object - Name of the object being operated on, like 'joe'
-params - A hash ref of additional information about the action
+
+=item time - Unix time the action happened.
+
+=item id - A unique ID for the action.
+
+=item user - The Webmin user who did it.
+
+=item sid - The user's session ID.
+
+=item ip - The IP address they were logged in from.
+
+=item module - The Webmin module name in which the action was performed.
+
+=item script - Relative filename of the script that performed the action.
+
+=item action - A short action name, like 'create'.
+
+=item type - The kind of object being operated on, like 'user'.
+
+=item object - Name of the object being operated on, like 'joe'.
+
+=item params - A hash ref of additional information about the action.
=cut
sub parse_logline
Returns details of file changes made by this action. Each of which is a
hash ref with the keys :
-type - The change type, such as create, modify, delete, exec, sql or kill
-object - The file or database the change was made to
-diff - A diff of the file change made
-input - Input to the command run, if available
+
+=item type - The change type, such as create, modify, delete, exec, sql or kill.
+
+=item object - The file or database the change was made to.
+
+=item diff - A diff of the file change made.
+
+=item input - Input to the command run, if available.
=cut
sub list_diffs
Returns details of original files before this action was taken. Each is a hash
ref containing keys :
-type - One of create, modify or delete
-file - Full path to the file
-data - Original file contents, if any
+
+=item type - One of create, modify or delete.
+
+=item file - Full path to the file.
+
+=item data - Original file contents, if any.
=cut
sub list_files
=head2 get_annotation(&action)
-Returns the text of the log annotation for this action
+Returns the text of the log annotation for this action, or undef if none.
=cut
sub get_annotation
=head2 save_annotation(&action, text)
-Updates the annotation for some action
+Updates the annotation for some action.
=cut
sub save_annotation
=head2 expand_base_dir(base)
-Finds files either under some dir, or starting with some path
+Finds files either under some dir, or starting with some path in the same
+directory.
=cut
sub expand_base_dir
=head2 can_user(username)
-Returns 1 if the current Webmin user can view log entries for the given user
+Returns 1 if the current Webmin user can view log entries for the given user.
=cut
sub can_user
=head2 can_mod(module)
-Returns 1 if the current Webmin user can view log entries for the given module
+Returns 1 if the current Webmin user can view log entries for the given module.
=cut
sub can_mod
}
}
-=head2 get_action_description(&action, long)
+=head2 get_action_description(&action, [long])
Returns a human-readable description of some action. This is done by
-calling the log_parser.pl file in the action's source module.
+calling the log_parser.pl file in the action's source module. If the long
+parameter is set to 1 and the module provides a more detailed description
+for the action, it will be returned.
=cut
sub get_action_description