Currently when the logger emits an error, it writes the entire stack trace in 1 line, which is very difficult to read. It would be good to have this printed across a multi-line log message.
For example:
{"level":"error","ts":1676073949.824918,"caller":"spdx/parse_spdx.go:181","msg":"error generating spdx edge node type mismatch during contains edge creation","stacktrace":"github.com/guacsec/guac/pkg/ingestor/parser/spdx.(*spdxParser).CreateEdges\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/spdx/parse_spdx.go:181\ngithub.com/guacsec/guac/pkg/ingestor/parser/common.(*GraphBuilder).CreateAssemblerInput\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/common/graph_builder.go:42\ngithub.com/guacsec/guac/pkg/ingestor/parser.ParseDocumentTree\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/parser.go:124\ngithub.com/guacsec/guac/pkg/ingestor/parser.Subscribe.func1\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/parser.go:90\ngithub.com/guacsec/guac/pkg/emitter.(*pubSub).GetDataFromNats\n\t/go/src/github.com/guacsec/guac/pkg/emitter/nats_data.go:49\ngithub.com/guacsec/guac/pkg/ingestor/parser.Subscribe\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/parser.go:108\ngithub.com/guacsec/guac/cmd/ingest/cmd.getIngestor.func1\n\t/go/src/github.com/guacsec/guac/cmd/ingest/cmd/ingest.go:156\ngithub.com/guacsec/guac/cmd/ingest/cmd.glob..func2.4\n\t/go/src/github.com/guacsec/guac/cmd/ingest/cmd/ingest.go:127"}
Currently when the logger emits an error, it writes the entire stack trace in 1 line, which is very difficult to read. It would be good to have this printed across a multi-line log message.
For example:
{"level":"error","ts":1676073949.824918,"caller":"spdx/parse_spdx.go:181","msg":"error generating spdx edge node type mismatch during contains edge creation","stacktrace":"github.com/guacsec/guac/pkg/ingestor/parser/spdx.(*spdxParser).CreateEdges\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/spdx/parse_spdx.go:181\ngithub.com/guacsec/guac/pkg/ingestor/parser/common.(*GraphBuilder).CreateAssemblerInput\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/common/graph_builder.go:42\ngithub.com/guacsec/guac/pkg/ingestor/parser.ParseDocumentTree\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/parser.go:124\ngithub.com/guacsec/guac/pkg/ingestor/parser.Subscribe.func1\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/parser.go:90\ngithub.com/guacsec/guac/pkg/emitter.(*pubSub).GetDataFromNats\n\t/go/src/github.com/guacsec/guac/pkg/emitter/nats_data.go:49\ngithub.com/guacsec/guac/pkg/ingestor/parser.Subscribe\n\t/go/src/github.com/guacsec/guac/pkg/ingestor/parser/parser.go:108\ngithub.com/guacsec/guac/cmd/ingest/cmd.getIngestor.func1\n\t/go/src/github.com/guacsec/guac/cmd/ingest/cmd/ingest.go:156\ngithub.com/guacsec/guac/cmd/ingest/cmd.glob..func2.4\n\t/go/src/github.com/guacsec/guac/cmd/ingest/cmd/ingest.go:127"}