Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
I got the following error when trying to run the importLogs.bat script
[quote:6d7282656a] The log(s) could not be imported because an error occured: String index out of range: -1[/quote:6d7282656a]
Can you give a little background about how this script work? What kind of file does it look for? I have couple backup activity logs in the same logs folder, but I rename them to activity_log2005-06-12.txtbackup. Does this affect the script?
Thanks, Luong.
Subject: RE: import activity log Replied by: Michael Bochynski on 14-06-2006 05:02:15 PM Hi Luong,
The importLogs script looks for all activity logs ifiles in the logs folder for the given application. The script searches for all the files starting with the prefix "activity_log". What it means taht both the original log and your backup will be picked up by this script.
In the next step, importer parses the file asusming that each line has six values, separated by 5 commas. Typically, each line would have the following format:
SESSIONID, TIMESTAMP, ELEMENT_NAME, CATEGORY, DATA, VALUE
Note that some of the values might be null, however the formta would be the same. Please refer to the User Guide documentation for full description for activity logs components.
The error you are seeing most likely means that in your activity log(s) there is a line that does not have 6 values separated by 5 commas and hence the index out of bounds exception.
Hope this helps, Michael
Subject: RE: import activity log Replied by: null on 14-06-2006 05:41:53 PM Does it process today's ongoing log?
Thanks.
Subject: RE: import activity log Replied by: Michael Bochynski on 14-06-2006 05:54:40 PM Luong,
Yes, it does. The importLogs script looks for all the files starting with "activity_log", meaning that the current activity log will be used as well.
Regards, Michael
Subject: RE: import activity log Replied by: null on 14-06-2006 08:27:29 PM If I run the sript twice on the same set of logs, does it overwrite the old data or make duplicate rows?
Subject: RE: import activity log Replied by: Michael Bochynski on 19-06-2006 10:25:43 PM Luong,
The importLogs admin script will create a duplicate rows, since it uses INSERT sql statement to add data to the database.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: