aboutsummaryrefslogtreecommitdiff
path: root/lib/Log/Abstract.rakumod
blob: 81ec093f04528fc3d5ffeeae16490e16a4eae8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /usr/bin/env false

use v6.d;

use Log::Level;

unit role Log::Abstract;

# Methods for handling plain string messages.
multi method emergency (Str:D $) { * }
multi method alert (Str:D $) { * }
multi method critical (Str:D $) { * }
multi method error (Str:D $) { * }
multi method warning (Str:D $) { * }
multi method notice (Str:D $) { * }
multi method info (Str:D $) { * }
multi method debug (Str:D $) { * }

# Methods for handling formatted messages.
multi method emergency (Str:D $, *@) { * }
multi method alert (Str:D $, *@) { * }
multi method critical (Str:D $, *@) { * }
multi method error (Str:D $, *@) { * }
multi method warning (Str:D $, *@) { * }
multi method notice (Str:D $, *@) { * }
multi method info (Str:D $, *@) { * }
multi method debug (Str:D $, *@) { * }

# Method for configuration
multi method add-output (IO::Handle:D $, Int() $ where Log::Level::Emergency ≤ * ≤ Log::Level::Debug, Callable $?) { * }

=begin pod

=NAME    Log::Abstract
=VERSION 0.2.0
=AUTHOR  Patrick Spek <p.spek@tyil.nl>

=begin LICENSE
Copyright © 2020

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License along
with this program.  If not, see http://www.gnu.org/licenses/.
=end LICENSE

=end pod

# vim: ft=raku noet sw=8 ts=8