1
0
mirror of https://github.com/coreos/ignition.git synced 2026-02-06 18:47:54 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
yasminvalim
d0e675e2d0 internal/log: Ignore logger close error
Closing the logger is usually the last operation that will be run and at
this point, we don't have a good way to report errors, and it's also too
late to act on them. Thus ignore those errors.

Fixes lint:
```
Error return value of `l.ops.Close` is not checked (errcheck)
```
2025-08-07 12:37:44 +02:00
Timothée Ravier
6b22612155 Revert "fix: Handle unchecked error returns across the codebase and other linter issues"
Too many changes in a single commit. Will be split to make it easier to
review.

This reverts commit de452c404c.
2025-08-04 17:08:18 +02:00
yasminvalim
de452c404c fix: Handle unchecked error returns across the codebase and other linter issues
The linter found staticcheck and errorcheck issues.  Deferred statements now  use join  to combine any new error with an existing one, preventing error information from being lost. Other minor error checks, like for printing text  and flushing data have also been addressed.
2025-07-28 19:12:25 -03:00
Jonathan Lebon
27f7eaaa0b internal/exec: move report logging to log package
Prep for using it from another package.
2022-01-07 16:51:36 -05:00
Sohan Kunkerkar
b23e7b9f6d internal/log: drop the error return to appease golanci-lint 2020-12-19 16:03:09 -05:00
Andrew Jeddeloh
1cfb161d9d log: use os.ProcessState.ExitCode instead of unix
The existing code fails the typecast. Go added a function for what we
want to do anyway, use that.
2019-12-13 13:43:07 -08:00
Andrew Jeddeloh
cfa7ad27f7 internal,tests: abolish syscall package
Stop using the syscall package; it is deprecated. Use
golang.org/x/sys/unix instead.
2019-11-11 10:36:57 -08:00
bubblemelon
1e32e166a7 internal: Switched log level lables
WARNING label when fetch config fails and INFO label when user empty.
2018-05-31 14:28:09 -07:00
Derek Gonyeo
c8d03fce1b internal: add -log-to-stdout flag
Add -log-to-stdout flag which forces logging to stdout instead of the
system log.
2018-01-25 15:18:18 -08:00
Derek Gonyeo
82c71be09e internal/log: modify LogCmd to return exit codes
For inspecting how a command failed it can be useful to inspect the exit
code of the command. This commit modifies the LogCmd command to return
the command's exit code in addition to any errors. -1 if some error was
encountered and there is no exit code.
2017-05-15 17:04:35 -07:00
Vito Caputo
b54b1b7445 log: log command executed on LogCmd errors.
Some call sites are doing this ad-hoc inconsistently, just always log
this when there's an error, with the error, full command line, stdout,
and stderr nicely ordered.
2016-08-24 17:15:30 -07:00
Alex Crawford
ae468ea806 log: capture stdout from subcommands 2016-05-26 15:24:59 -07:00
Alex Crawford
4a1e8353d5 *: rename src package to internal
This will prevent Ignition's implementation from being imported.
2016-03-31 17:42:22 -07:00