DEVICE LOG SIZE LIMITATION - Alternate SYSOUT?

I've written a very useful Data Field that models performance targets for Power, KJ spent, StopTime, etc. A race plan I hope to follow during a 24 hr race. I also train with this. It is useful to write out some data using System.println to the device's LOG directory every N minutes (say, every 30 mins)... With the calculated target values and my actual performance metrics. So I can quickly assess how well I followed the plan post-race or following training.

Anyway - as you may know, the LOG files max out at 6kb, then rollover to a BAK file. So it appears that the max size for a LOG is 12kb (between the BAK and the ACTIVE log files for a data field).

Is there a config parameter to extend the log size. Or another mechanism to write to a TEXT file on the device from a running Data Field?

  • No way to extend it, and other than doing something like sending the data to a companion app, no other way to save just your data. You could put the data in the .fit and extract it in some way later.

    the <myapp>.txt is really more of a debugging thing on the watch and not really for logging data.
  • No way to extend it, and other than doing something like sending the data to a companion app, no other way to save just your data. You could put the data in the .fit and extract it in some way later.

    the <myapp>.txt is really more of a debugging thing on the watch and not really for logging data.


    Yep - and it is useful for debugging. But consider the feature request to allow writing to a local text file with extended size caps. Really would be a useful feature. Thanks.
  • Just did a test and my output string (about 50 characters long) can be sent about 120 times before filling up the LOG buffer for that data field. So I can output it every 15 minutes during a 24hr race and be fine. Thanks!!

    Here is the simple logic in case that helps anyone else generate a local data set on the device from a data field. Note that you really can only count on 1 file to contain the activity data... consider the case then you write 1 line to the bottom of the existing LOG file, which fills it up, it overwrites the BAK LOG file, and the 2nd line starts with the new empty LOG file. So really you can only count on 6KB of LOG space for a particular activity for local data output.

    // GLOBAL VARIABLE THAT RETAINS STATE
    var sysoutFlag = null; // global variable that retains trigger state, null causes it to write at start of activity too


    // LOGIC IN THE COMPUTE METHOD, CALLED EVERY SECOND
    // PRINTS ONLY ONCE ACTIVITY HAS STARTED, THEN IMMEDIATELY, AND THEN EVERY "N" MINUTES
    var sysoutFreq = 10; // number of minutes between writing to sysout

    if (elapsedTime > 0 && (sysoutFlag == null || (Math.floor(elapsedTime/1000/60) % sysoutFreq == 0 && sysoutFlag == true))) {
    System.println("enter your string" + " here");
    sysoutFlag = false; // print just once per trigger
    }
    if (sysoutFlag == false && Math.floor(elapsedTime/1000/60) % sysoutFlag != 0) { sysoutFlag = true; }

  • Former Member
    Former Member over 7 years ago
    You could log your performance as a percentage of your targets as fit contributions, and produce graphs of this data on Garmin Connect. This data could potentially be recorded every second.