added debug log output to palette export
This commit is contained in:
parent
f8a12261ea
commit
2b26dd2ee0
1 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,7 @@ func exportPalette(colors []color.Color) {
|
|||
if len(colors) == 0 || !config.IsPaletteSet() {
|
||||
return
|
||||
}
|
||||
timestamp := time.Now().UnixMilli()
|
||||
var palette string
|
||||
for index, color := range colors {
|
||||
if index > 0 {
|
||||
|
@ -33,7 +34,9 @@ func exportPalette(colors []color.Color) {
|
|||
}
|
||||
error := os.WriteFile(config.Palette, []byte(palette), 0775)
|
||||
if error != nil {
|
||||
loggo.Error("encountered an error exporting a color palette", error.Error())
|
||||
loggo.ErrorTimed("encountered an error exporting a color palette", timestamp, error.Error())
|
||||
} else {
|
||||
loggo.DebugTimed("exported color palette to filesystem", timestamp, "path: "+config.Palette)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue