]> ruderich.org/simon Gitweb - safcm/safcm.git/blob - log.go
sync: replace log.Logger interface with struct
[safcm/safcm.git] / log.go
1 // RPC primitives for safcm: logging constants
2
3 // Copyright (C) 2021  Simon Ruderich
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 package safcm
19
20 // LogLevel controls the number of displayed log messages. Higher levels
21 // include all messages from lower levels (e.g. LogVerbose includes all
22 // messages from LogInfo).
23 type LogLevel int
24
25 const (
26         _ LogLevel = iota
27         // Log only errors
28         LogError
29         // Log changes
30         LogInfo
31         // Log host information and changes on remote host
32         LogVerbose
33         // Log additional information and commands leading up to the changes
34         LogDebug
35         // Log output of all commands
36         LogDebug2
37         // Log all RPC messages
38         LogDebug3
39 )