The applog file is not save in the correct directory

Forum for discussion on different user applications
Locked
Jianjunmeng
Posts: 8
Joined: 28 Apr 2014, 12:37

The applog file is not save in the correct directory

Post by Jianjunmeng » 12 Dec 2014, 18:07

Hello,
I modified the CursorTask and add some new lines in the source code and rebuild it. After that I found my applog file is not saved in the same directory as the data file. And it's in the parent directory above the data directory and is named as session001.applog. It's weird. How can I solve this problem? Thank you very much.
Best,
Steve

Jianjunmeng
Posts: 8
Joined: 28 Apr 2014, 12:37

Re: The applog file is not save in the correct directory

Post by Jianjunmeng » 14 Dec 2014, 13:16

Are the applog file supposed to be in the same directory as the data file? I'm a little bit confused. Thanks.

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: The applog file is not save in the correct directory

Post by mellinger » 08 Jan 2015, 12:14

Hi,

typically the application log file is supposed to be in the same directory as the data file.
However, there is a conceptual problem inherent in the definition of the application log file's location, because
1) data files are written by the source module,
2) the application module might run on a different machine, and connect to the remaining modules via a network.
The proper way to deal with this would be to have the application log file being written by the source module, and use the BCI2000 protocol to transfer log data from the application module to the source module.

However, application log files are not formally a part of the BCI2000 specification, so the application log is written directly to disk by the application module. In order for this to work in an acceptable way when source and application modules are located on different machines, the application module uses a location relative to its working directory at configuration time, chosen such that it coincides with the source module's data directory if both happen to execute on the same machine.

To avoid problems related to this fragile mechanism, make sure to start both the source module and the application module from the same working directory (e.g., from a common script without any 'cd' commands in between), and avoid to permanently change a module's working directory (i.e., change it back to original in case you must change it).

HTH,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 21 guests