summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-16 14:49:57 +0100
committerintrigeri <intrigeri@boum.org>2009-01-16 15:06:42 +0100
commit1c53179e978380d7447f6e5f9a8f4d69f88a854a (patch)
treee7d8da4c099a9d8b62dabb63c5c0d08259c0babc
parent523718b181e9767d322bba3fe0b68cfcf85056a6 (diff)
add a warning (exported) function to the core
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r--IkiWiki.pm6
-rw-r--r--doc/plugins/write.mdwn4
2 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index ca483a111..08017635f 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -21,7 +21,7 @@ our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
bestlink htmllink readfile writefile pagetype srcfile pagename
displaytime will_render gettext urlto targetpage
add_underlay pagetitle titlepage linkpage newpagefile
- inject
+ inject warning
%config %links %pagestate %wikistate %renderedfiles
%pagesources %destsources);
our $VERSION = 3.00; # plugin interface version, next is ikiwiki version
@@ -579,6 +579,10 @@ sub error ($;$) {
die $message."\n";
}
+sub warning ($) {
+ return log_message(warning => @_);
+}
+
sub debug ($) {
return unless $config{verbose};
return log_message(debug => @_);
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index fff142fa2..4db02b532 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -555,6 +555,10 @@ the id can be controled by the user.
Logs a debugging message. These are supressed unless verbose mode is turned
on.
+#### `warning($)`
+
+Logs a warning message.
+
#### `error($;$)`
Aborts with an error message. If the second parameter is passed, it is a