Create log file

Signed-off-by: Itxaka <itxakaserrano@gmail.com>
This commit is contained in:
Itxaka
2023-08-14 16:30:17 +02:00
parent 2a7fb1d415
commit 624241aa41

View File

@@ -95,7 +95,7 @@ func NewKairosLogToFile(logfile string, opts ...LogOption) (*KairosLog, error) {
// NewKairosMultiLog provides a logger that logs to both console and a given file
func NewKairosMultiLog(logfile string, opts ...LogOption) (*KairosLog, error) {
f, err := os.OpenFile(logfile, os.O_WRONLY|os.O_APPEND, 0666)
f, err := os.OpenFile(logfile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
return nil, err
}