static public void setMaxLogStoreSize ( final int bytes ) { // TODO: also check if bytes is bigger than remaining disk space? if ( bytes >= 10000 ) { logFileMaxSize = bytes ; } if ( null != context ) { SharedPreferences prefs = context . getSharedPreferences ( SHARED_PREF_KEY , Context . MODE_PRIVATE ) ; prefs . edit ( ) . putInt ( SHARED_PREF_KEY_logFileMaxSize , logFileMaxSize ) . commit ( ) ; } }
Set the maximum size of the local log file . Once the maximum file size is reached no more data will be appended . Consider that this file is sent to a server .