Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
fix: remove file logger
Browse files Browse the repository at this point in the history
  • Loading branch information
jon4hz committed Aug 18, 2022
1 parent 73f0435 commit 22dfa3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,7 @@ func rootHandler(cmd *coral.Command, args []string) error {
out = cli.Stdout()
}

exename, err := os.Executable()
if err != nil {
return err
}
f, err := os.Create(exename + ".log")
if err != nil {
return fmt.Errorf("Error while opening log file err: %s filename %s", err, exename+".log")
}
logger := logging.New(out, f, cfg.Logger)
logger := logging.New(out, cfg.Logger)

ctx, cancel := context.WithCancel(cmd.Context())
stc := newStratumClient(ctx, cfg.Miner.PoolURL, cfg.Miner.Wallet, logger)
Expand Down
2 changes: 1 addition & 1 deletion internal/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"go.uber.org/zap/zapcore"
)

func New(console, logfile io.Writer, cfg *config.Logger) logr.Logger {
func New(console io.Writer, cfg *config.Logger) logr.Logger {
var logLevelConsole zap.AtomicLevel
if cfg.Debug { // setup debug mode if requested
cfg.CLogLevel = 1
Expand Down

0 comments on commit 22dfa3a

Please sign in to comment.