Compare commits

...

17 commits

Author SHA1 Message Date
a68821fc2a test2 2022-07-01 03:08:47 -04:00
grumbulon
fb1c40d6d9 test 2022-07-01 03:07:46 -04:00
grumbulon
d845808a3c I hate vscode 2022-06-29 21:07:57 -04:00
grumbulon
a62f0b0759 upstream 2022-06-29 21:05:49 -04:00
grumbulon
4353aa9559 Accidentally left something I was testing in..oops
All checks were successful
continuous-integration/drone/pr Build is passing
2022-06-29 09:25:06 -04:00
grumbulon
f7e5a7adee Added fatal logging, made doc for package better, and some minor changes
All checks were successful
continuous-integration/drone/pr Build is passing
2022-06-29 09:22:28 -04:00
be3b81029e Merge branch 'master' into master
All checks were successful
continuous-integration/drone/pr Build is passing
2022-06-29 13:20:45 +00:00
dfea8060dd Merge branch 'master' into master
All checks were successful
continuous-integration/drone/pr Build is passing
2022-06-28 18:20:24 +00:00
grumbulon
6d30a5ad9b Logging works bretty good now
Some checks are pending
continuous-integration/drone/pr Build is running
2022-06-28 14:11:49 -04:00
grumbulon
a36f1b8685 Added debuge flag, and added init for logawl 2022-06-28 12:12:52 -04:00
d4b8d1469f Update module github.com/urfave/cli/v2 to v2.10.3 2022-06-28 11:48:23 -04:00
f50b793931 Update module github.com/stretchr/testify to v1.7.5 2022-06-28 11:48:23 -04:00
grumbulon
68e6e54741 Accidentally reverted to old commit with dns.go 2022-06-26 14:16:38 -04:00
grumbulon
8b1a5f9147 Merge remote-tracking branch 'upstream/master'
Merging upstream into fork
2022-06-26 14:10:35 -04:00
grumbulon
6da6a55f6e Logging refinements 2022-06-26 14:01:13 -04:00
8c61f9f409 logging (#1)
Promoting branch to master

Co-authored-by: grumbulon <grumbulon@dismail.de>
Reviewed-on: grumbulon/awl#1
2022-06-26 04:07:58 +00:00
grumbulon
182ec20469 Revert "hehe off-by-one"
This reverts commit db78235ecd.

Reverting to old commit because I fucked up
2022-06-25 13:46:38 -04:00
2 changed files with 35 additions and 0 deletions

5
cli.go
View file

@ -134,6 +134,11 @@ func prepareCLI() *cli.App {
Aliases: []string{"x"},
Usage: "do a reverse lookup",
},
&cli.BoolFlag{
Name: "debug",
Usage: "enable debug logging",
Value: false,
},
},
Action: doQuery,
}

30
logawl/doc.go Normal file
View file

@ -0,0 +1,30 @@
/*
LogAwl is a package for custom logging needs
LogAwl extends the standard log library with support for log levels
This is _different_ from the syslog package in the standard library because you do not define a file
because awl is a cli utility it writes directly to std err.
*/
// Use the New() function to init logawl
//
// logger := logawl.New()
//
// You can call specific logging levels from your new logger using
//
// logger.Debug("Message to log")
// logger.Fatal("Message to log")
// logger.Info("Message to log")
// logger.Error("Message to log")
//
// You may also set the log level on the fly with
//
// Logger.SetLevel(3)
// This allows you to change the default level (Info) and prevent log messages from being posted at higher verbosity levels
//for example if
// Logger.SetLevel(3)
// is not called and you call
// Logger.Debug()
// this runs through
// IsLevel(level)
// to verify if the debug log should be sent to std.Err or not based on the current expected log level
package logawl