Skip to content

Commit

Permalink
Support for log-output configuration through K6_LOG_OUTPUT env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Aug 12, 2020
1 parent f93c23a commit c322ca8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ var RootCmd = &cobra.Command{
SilenceErrors: true,
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
logger := logrus.StandardLogger() // don't use the global one to begin with
if envLogOutput, ok := os.LookupEnv("K6_LOG_OUTPUT"); ok {
logOutput = envLogOutput
}
err := setupLoggers(logger, logFmt, logOutput)
if err != nil {
return err
Expand Down

0 comments on commit c322ca8

Please sign in to comment.