Issue while downloading log data

Hello All,

I have Metamotion S. and I am facing the issue while downloading the logs data. I am using the following code. However, log data is not showing up in the Android Logcat. I did see downloading pending and a completed download message. Unfortunately, can't the logs.

Any help, suggestions would be appreciated.
`
Accelerometer accelerometer = board.getModule(Accelerometer.class);
if (accelerometer != null) {
accelerometer.configure()
.odr(25f)
.range(4f)
.commit();
}

if (accelerometer != null) {
accelerometer.acceleration().addRouteAsync(new RouteBuilder() {
@Override
public void configure(RouteComponent source) {
source.log(new Subscriber() {
@Override
public void apply(Data data, Object... env) {
Acceleration acceleration = data.value(Acceleration.class);
metaMotion.accelerometer.add(new Axis(acceleration.x(), acceleration.y(), acceleration.z()));
Log.e("Accelerometer", data.value(Acceleration.class).toString());

                    }
                });
            }
        }).continueWith(new Continuation<Route, Void>() {
            @Override
            public Void then(Task<Route> task) throws Exception {
                accelerometer.acceleration().start();
                accelerometer.start();
                Logging logging = board.getModule(Logging.class);
                logging.start(true);
                return null;
            }
        });
    }

Downloading data at every 3.5 seconds:
Logging logging = board.getModule(Logging.class);
logging.flushPage();
logging.downloadAsync(100, new Logging.LogDownloadUpdateHandler() {
@Override
public void receivedUpdate(long nEntriesLeft, long totalEntries) {
Log.i("downloading", "Progress Update = " + nEntriesLeft + "/" + totalEntries);
}
}).continueWithTask(new Continuation<Void, Task>() {
@Override
public Task then(Task task) throws Exception {
Log.i("downloading", "Download completed");
return null;
}
});
`

Comments

  • I am writing down all the steps depending on which you can download your log data error free -

    Downloading User Logs Files
    You can download user logs on the User Logs Download page. Download user logs to monitor system activity and troubleshoot problems.
    The User Logs Download page displays up to ten archived log files plus the current day log file. By default, the system rotates each file every 24 hours or if the file size reaches one Gigabyte uncompressed. You can change this default setting to rotate every week or month in the Reports > Diagnostics: Logging page. Additionally, you can rotate the files based on file size.
    The automatic rotation of system logs deletes your oldest log file, labelled as Archived log #10, pushes the current log to Archived log # 1, and starts a new current-day log file.
    To download user logs
    1. Choose Reports > Diagnostics: User Logs Downloads to display the User Logs Download page.
    2. Click the log name in the Download Plain Text column or the Download Compressed column.
    3. Open or save the log (these procedures vary depending on which browser you are using).
    4. Click Rotate Logs to manually archive the current log to a numbered archived log file and then clear the log so that it is empty again.
    When you click Rotate Logs, your archived file #1 contains data for a partial day because you are writing a new log before the current 24-hour period is complete.
    Downloading System Logs
    You can download system logs on the System Logs Download page. Download system logs to monitor system activity and troubleshoot problems. Basically, I am trying to use this log data on erp implementation plan and related things.
    The System Logs Download page displays up to ten archived log files plus the current day log file. By default, the system rotates each file every 24 hours or if the file size reaches one Gigabyte uncompressed. You can change this default setting to rotate every week or month in the Reports > Diagnostics: Logging page. Additionally, you can rotate the files based on file size.
    The automatic rotation of system logs deletes your oldest log file, labelled as Archived log #10, pushes the current log to Archived log # 1, and starts a new current-day log file.
    To download system logs
    1. Choose Reports > Diagnostics: System Logs Download to display the System Logs Download page.
    Figure: System Logs Download Page
    2. Click the log name in the Download Plain Text column or the Download Compressed column.
    3. Open or save the log (these procedures vary depending on which browser you are using).
    4. Click Rotate Logs to manually archive the current log to a numbered archived log file and then clear the log so that it is empty again.
    When you click Rotate Logs, your archived file contains data for a partial day because you are writing a new log before the current 24-hour period is complete.

    Hope this article will help you to download the log data.

  • @Raghav and @jamiebiswas,
    Sorry we don't have any Java developers at this time so we can't comment much on this code.

Sign In or Register to comment.