improved logging
This commit is contained in:
parent
df7751c5d9
commit
de119fa05f
|
@ -129,6 +129,7 @@ func WriteToFile(filename string, mods *Modlist) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
os.WriteFile(filename, data, os.FileMode(0744))
|
os.WriteFile(filename, data, os.FileMode(0744))
|
||||||
|
log.Infof("Wrote modlist to file %s.", filename)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,6 +147,7 @@ func ReadFromFile(filename string) (Modlist, error) {
|
||||||
return Modlist{}, err
|
return Modlist{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Infof("Read modlist from file %s.", filename)
|
||||||
return mods, nil
|
return mods, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +167,7 @@ func AddModsNotInList(modsdir string, mods *Modlist) error {
|
||||||
version := groups[0][2]
|
version := groups[0][2]
|
||||||
|
|
||||||
if !mods.HasMod(name) {
|
if !mods.HasMod(name) {
|
||||||
log.Printf("%s isn't enabled, adding v%s in disabled state.", name, version)
|
log.Info("Found %s not in modlist, adding v%s in disabled state.", name, version)
|
||||||
mods.Mods = append(mods.Mods, Mod{
|
mods.Mods = append(mods.Mods, Mod{
|
||||||
Name: name,
|
Name: name,
|
||||||
Enabled: false,
|
Enabled: false,
|
||||||
|
|
Loading…
Reference in a new issue