mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-08 05:50:47 +00:00
implement structured logging
This commit is contained in:
committed by
Benj Fassbind
parent
0c749922c9
commit
8e62195eb5
+7
-1
@@ -48,6 +48,7 @@ type AptlyContext struct {
|
||||
publishedStorages map[string]aptly.PublishedStorage
|
||||
dependencyOptions int
|
||||
architecturesList []string
|
||||
structuredLogging bool
|
||||
// Debug features
|
||||
fileCPUProfile *os.File
|
||||
fileMemProfile *os.File
|
||||
@@ -195,7 +196,7 @@ func (context *AptlyContext) Progress() aptly.Progress {
|
||||
|
||||
func (context *AptlyContext) _progress() aptly.Progress {
|
||||
if context.progress == nil {
|
||||
context.progress = console.NewProgress()
|
||||
context.progress = console.NewProgress(context.structuredLogging)
|
||||
context.progress.Start()
|
||||
}
|
||||
|
||||
@@ -540,6 +541,11 @@ func (context *AptlyContext) GoContextHandleSignals() {
|
||||
}()
|
||||
}
|
||||
|
||||
// StructuredLogging allows to set the structuredLogging flag
|
||||
func (context *AptlyContext) StructuredLogging(structuredLogging bool) {
|
||||
context.structuredLogging = structuredLogging
|
||||
}
|
||||
|
||||
// Shutdown shuts context down
|
||||
func (context *AptlyContext) Shutdown() {
|
||||
context.Lock()
|
||||
|
||||
Reference in New Issue
Block a user