improve logging facility

we have a log viewer within the program now
This commit is contained in:
tildearrow 2022-04-10 22:12:02 -05:00
parent 4ae13c15e6
commit fddd05dc1a
33 changed files with 556 additions and 386 deletions

View file

@ -486,7 +486,7 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
char magic[4];
reader.read(magic,4);
if (memcmp(magic,"INST",4)!=0) {
logE("invalid instrument header!\n");
logE("invalid instrument header!");
return DIV_DATA_INVALID_HEADER;
}
reader.readI();
@ -949,12 +949,12 @@ bool DivInstrument::save(const char* path) {
FILE* outFile=ps_fopen(path,"wb");
if (outFile==NULL) {
logE("could not save instrument: %s!\n",strerror(errno));
logE("could not save instrument: %s!",strerror(errno));
w->finish();
return false;
}
if (fwrite(w->getFinalBuf(),1,w->size(),outFile)!=w->size()) {
logW("did not write entire instrument!\n");
logW("did not write entire instrument!");
}
fclose(outFile);
w->finish();