Doodle3D / print3d

The application that runs on a Doodle3D WiFi box that communicates with printers.
www.doodle3d.com
GNU General Public License v2.0
13 stars 4 forks source link

No logs? #48

Closed peteruithoven closed 7 years ago

peteruithoven commented 7 years ago

I might have forgotten some technical aspects of the WiFi-Box but I can't find print3d's logs in version 0.10.10 and higher.

They are also not located in wifibox-rotated. I checked both the downloaded logfiles and the /tmp directory on a WiFi-Box. The new tailp3d also can't find the logs:

# tailp3d
tail: can't open '/tmp/print3d-ttyACM0.log': No such file or directory
tail: no files

I can find them in 0.10.9. Then it's simply something like: /tmp/print3d-ttyACM0.log.

peteruithoven commented 7 years ago

To get more information I tried starting print3d myself. I stopped the service (/etc/init.d/print3d stop) and manually started the print3d runner:

# /usr/libexec/print3d-runner.sh ttyACM0
Print 3D server
Platform information: unknown endianness (assuming big), sizeof(short)=2, sizeof(int)=4, sizeof(long)=4, sizeof(float)=4
Error: could not read log basename from settings (Success)
Error: could not open log with UCI settings

I also noticed that the latest stable version refers to wifibox uci configuration that I can't find in the WiFi-Box's configuration. https://github.com/Doodle3D/print3d/blob/master/src/server/main.cpp#L29-L31

I also can't find these fields in the post-install script, which we normally use to add new fields: https://github.com/Doodle3D/doodle3d-firmware/blob/master/post-install.sh#L118-L148

peteruithoven commented 7 years ago

Those config fields do seem to be included in the default wifibox config: https://github.com/Doodle3D/doodle3d-firmware/blob/master/src/script/wifibox.uci.config#L7-L9

peteruithoven commented 7 years ago

I confirmed my fear, after doing an clear install (not keeping config) the logs are created. Looks like we forgot to add these fields to post-install.sh.

peteruithoven commented 7 years ago

I've added the following to the postinstall.sh script

    # update wifibox's config for config changes in 0.10.10
    uci set wifibox.system.log_path='/tmp'
    uci set wifibox.system.api_log_filename='wifibox.log'
    uci set wifibox.system.p3d_log_basename='print3d'

Then after doing a clean install of 0.10.9 and then updating (keeping the configuration to my custom build the following fields where added:

    option log_path '/tmp'
    option api_log_filename 'wifibox.log'
    option p3d_log_basename 'print3d'