noop impl (#32)

* improve logger usage
* add noop client and server

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-09-05 02:11:29 +03:00
committed by GitHub
parent c062aab1a9
commit c576749b57
24 changed files with 418 additions and 140 deletions

View File

@@ -25,7 +25,7 @@ func Verify(a auth.Auth) error {
if err != nil {
return err
}
if logger.V(logger.DebugLevel, logger.DefaultLogger) {
if logger.V(logger.DebugLevel) {
logger.Debugf("Auth [%v] Generated an auth account", a.String())
}
@@ -67,7 +67,9 @@ func Verify(a auth.Auth) error {
auth.WithExpiry(time.Minute*10),
)
if err != nil {
logger.Warnf("[Auth] Error refreshing token: %v", err)
if logger.V(logger.WarnLevel) {
logger.Warnf("[Auth] Error refreshing token: %v", err)
}
continue
}