summaryrefslogtreecommitdiffstats
path: root/modules/indexer
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-31 05:36:46 +0000
committerGitHub <noreply@github.com>2020-10-31 01:36:46 -0400
commit47dd1cb7ae8591b4c63b68371cc1922c0aa5f98e (patch)
tree11b9670fc2655642b7b82873ca8b5a48a5e607ff /modules/indexer
parentffc8ce7baef0715bdc2d04cfc1e18379426a1e89 (diff)
downloadgitea-47dd1cb7ae8591b4c63b68371cc1922c0aa5f98e.tar.gz
gitea-47dd1cb7ae8591b4c63b68371cc1922c0aa5f98e.zip
Refactor Logger (#13294)
Refactor Logger to make a logger interface and make it possible to wrap loggers for specific purposes. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/indexer')
-rw-r--r--modules/indexer/code/elastic_search.go2
-rw-r--r--modules/indexer/issues/elastic_search.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/indexer/code/elastic_search.go b/modules/indexer/code/elastic_search.go
index 08b20b80a0..0f61c4e592 100644
--- a/modules/indexer/code/elastic_search.go
+++ b/modules/indexer/code/elastic_search.go
@@ -40,7 +40,7 @@ type ElasticSearchIndexer struct {
}
type elasticLogger struct {
- *log.Logger
+ log.Logger
}
func (l elasticLogger) Printf(format string, args ...interface{}) {
diff --git a/modules/indexer/issues/elastic_search.go b/modules/indexer/issues/elastic_search.go
index 1f9c59965c..4cdeff53dc 100644
--- a/modules/indexer/issues/elastic_search.go
+++ b/modules/indexer/issues/elastic_search.go
@@ -27,11 +27,11 @@ type ElasticSearchIndexer struct {
}
type elasticLogger struct {
- *log.Logger
+ log.LevelLogger
}
func (l elasticLogger) Printf(format string, args ...interface{}) {
- _ = l.Logger.Log(2, l.Logger.GetLevel(), format, args...)
+ _ = l.Log(2, l.GetLevel(), format, args...)
}
// NewElasticSearchIndexer creates a new elasticsearch indexer