Merge pull request #47 from creekorful/45-harmonize-logging-message

Harmonize logging messages
pull/48/head
Aloïs Micard 4 years ago committed by GitHub
commit 6db7b7c94f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,10 +49,10 @@ func execute(c *cli.Context) error {
e := echo.New()
e.HideBanner = true
log.Info().Str("ver", c.App.Version).Msg("Starting tdsh-api")
log.Debug().Str("uri", c.String("elasticsearch-uri")).Msg("Using Elasticsearch server")
log.Debug().Str("uri", c.String("nats-uri")).Msg("Using NATS server")
log.Info().Str("ver", c.App.Version).
Str("elasticsearch-uri", c.String("elasticsearch-uri")).
Str("nats-uri", c.String("nats-uri")).
Msg("Starting tdsh-api")
signingKey := []byte(c.String("signing-key"))

@ -170,8 +170,6 @@ func setupElasticSearch(ctx context.Context, es *elastic.Client) error {
if _, err := es.CreateIndex(resourcesIndex).Do(ctx); err != nil {
return err
}
} else {
log.Debug().Msg("index exist")
}
return nil

@ -49,11 +49,12 @@ func GetApp() *cli.App {
func execute(ctx *cli.Context) error {
logging.ConfigureLogger(ctx)
log.Info().Str("ver", ctx.App.Version).Msg("Starting tdsh-crawler")
log.Debug().Str("uri", ctx.String("nats-uri")).Msg("Using NATS server")
log.Debug().Str("uri", ctx.String("tor-uri")).Msg("Using TOR proxy")
log.Debug().Strs("content-types", ctx.StringSlice("allowed-ct")).Msg("Allowed content types")
log.Info().
Str("ver", ctx.App.Version).
Str("nats-uri", ctx.String("nats-uri")).
Str("tor-uri", ctx.String("tor-uri")).
Strs("allowed-content-types", ctx.StringSlice("allowed-ct")).
Msg("Starting tdsh-crawler")
// Create the HTTP client
httpClient := &fasthttp.Client{

@ -39,10 +39,11 @@ func GetApp() *cli.App {
func execute(ctx *cli.Context) error {
logging.ConfigureLogger(ctx)
log.Info().Str("ver", ctx.App.Version).Msg("Starting tdsh-extractor")
log.Debug().Str("uri", ctx.String("nats-uri")).Msg("Using NATS server")
log.Debug().Str("uri", ctx.String("api-uri")).Msg("Using API server")
log.Info().
Str("ver", ctx.App.Version).
Str("nats-uri", ctx.String("nats-uri")).
Str("api-uri", ctx.String("api-uri")).
Msg("Starting tdsh-extractor")
apiClient, err := util.GetAPIAuthenticatedClient(ctx)
if err != nil {

@ -42,17 +42,15 @@ func GetApp() *cli.App {
func execute(ctx *cli.Context) error {
logging.ConfigureLogger(ctx)
log.Info().Str("ver", ctx.App.Version).Msg("Starting tdsh-scheduler")
log.Debug().Str("uri", ctx.String("nats-uri")).Msg("Using NATS server")
log.Debug().Str("uri", ctx.String("api-uri")).Msg("Using API server")
refreshDelay := parseRefreshDelay(ctx.String("refresh-delay"))
if refreshDelay != -1 {
log.Debug().Stringer("delay", refreshDelay).Msg("Existing resources will be crawled again")
} else {
log.Debug().Msg("Existing resources will NOT be crawled again")
}
log.Info().
Str("ver", ctx.App.Version).
Str("nats-uri", ctx.String("nats-uri")).
Str("api-uri", ctx.String("api-uri")).
Strs("forbidden-exts", ctx.StringSlice("forbidden-extensions")).
Dur("refresh-delay", refreshDelay).
Msg("Starting tdsh-scheduler")
// Create the API client
apiClient, err := util.GetAPIAuthenticatedClient(ctx)

Loading…
Cancel
Save