-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
578aea0
commit 23c65b9
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
"strconv" | ||
|
||
"github.com/rs/zerolog" | ||
|
||
"github.com/yunginnanet/HellPot/internal/config" | ||
"github.com/yunginnanet/HellPot/internal/version" | ||
) | ||
|
||
func printInfo(log zerolog.Logger, resolvedConf string, realConfig *config.Parameters) { | ||
log.Info().Msg("🔥 Starting HellPot 🔥") | ||
if realConfig.UsingDefaults { | ||
log.Warn().Msg("Using default configuration! Please edit the configuration file to suit your needs.") | ||
} | ||
log.Info().Msg("Version: " + version.Version) | ||
log.Info().Msg("PID: " + strconv.Itoa(os.Getpid())) | ||
log.Info().Msg("Using config file: " + resolvedConf) | ||
if realConfig.Logger.RSyslog != "" { | ||
log.Info().Msg("Logging to syslog: " + realConfig.Logger.RSyslog) | ||
} | ||
if realConfig.Logger.ActiveLogFileName != "" { | ||
log.Info().Msg("Logging to file: " + realConfig.Logger.ActiveLogFileName) | ||
} | ||
if realConfig.Logger.DockerLogging && | ||
realConfig.Logger.File == "" && | ||
realConfig.Logger.Directory == "" && | ||
realConfig.Logger.RSyslog == "" { | ||
log.Info().Msg("Only logging to standard output") | ||
} | ||
log.Debug().Msg("Debug logging enabled") | ||
log.Trace().Msg("Trace logging enabled") | ||
} |