Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to stop SLOG file from getting overwritten removing previous entries

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
tonyhoward.8794
545 Views, 8 Replies

how to stop SLOG file from getting overwritten removing previous entries

My understanding of the slog file is that when a central file is accessed an entry is made. What i have noticed is that these entries are getting overwritten therefore removing all history of previous entries. Is there a way to stop this from occuring? Is this linked to journal file cleanup and when journal number exceeds limits, usually set at default OOTB 10? Image attached is of a slog file that was accessed today, issue is that this file was created last month and has had multiple days work done on it and should therefore have older entries located within. Yesterday it had older entries.

 

Thanks for any assistance.

Tags (1)
8 REPLIES 8
Message 2 of 9

Unfortunately, this is probably not the best place to ask such a question.

 

Please note that this discussion forum is dedicated to programming Revit using the Revit API.

 

It is unclear to me whether you are asking this question from a programming or an end user point of view.

 

Are you doing anything programmatically yourself, or just using the standard Revit user interface?

 

If you are not doing anything programmatically yourself using the Revit API, I am afraid this is not the best place to ask such a question.

 

You cannot expect an answer to questions relating to system requirements, installation, product setup, optimisation, usage or other end user support issues here.

 

You should try one of the non-API Revit product support discussion forums instead for that:

 

https://forums.autodesk.com/t5/revit-api-forum/this-forum-is-for-revit-api-programming-questions-not...

 

The people there are much better equipped to address this topic than us programming nerds.

 

I hope this clarifies.

 

Thank you for your cooperation and understanding.

 

Best regards,

 

Jeremy

 

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 3 of 9

Hello Jeremy,

Thank you for your response. My question unfortunately doesnt fit within any of the other sections so i thought Revit API best suited it.

The reason for the Revit API tag was we are looking at reading the slog file within Revit through the API as a potential time clock type tool. 

Revit will read the slog file and generate a time in file output, as well as other outputs we require, that will go externally for other software to read.

We can search for slog files on our server and extract this information via python however was looking for a Revit API solution. 

The issue/question either as an API solution or an external python solution still stands, why does the slog file overwrite when it is supposed to append for each new session?

Thanks, i have posted to the Revit MEP forum however unsure if this is also the correct location.

Message 4 of 9

OK, I see, that makes sense. I asked the development team whether they can suggest anything. However, afaik, other people have also implemented various timekeeping solutions, and I have not heard of anyone making use of this particular log file for that purpose in the past. So, I will be very interested to hear how you end up using this. Thank you!

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 5 of 9

Hello Jeremy,

 

Thanks, the reason for looking at it from this approach is that we dont want to have to create an add in that requires staff to activate it if we can avoid it. I know there are approaches that work when the save command is selected, and then export out data, but i was trying to cover all bases to see if we can do it externally to the API as well as internally so that we can track project progression over time as well. I can extract the files so that we can see if there has been any activity which is fine however would like to generate a "over time" result, if the file overwrites we could code that in but would like to have further documentation on the slog file and why it is functioning the way it appears to.

 

Thanks again.

Message 6 of 9

Yes, I see. Thank you for the explanation.

 

Here is what the development team says:

  

Slogs (like journals) will only store data for so long before discarding old data. In my experience they can also be lost when re-initiating a model as a central, or performing a few other actions which are similar in scope to recreating the central. As long as they are collected quickly enough (daily should be fine) and at major inflection points (about to recreate the central model) they shouldn’t have any issues with data loss.
 
That said, for the task at hand they are somewhat ill-suited for a few reasons.

 

  • They only exist for central models, not families, massing, or non-workshared file types.
  • They do not log any actions beyond worksharing specific data, which is a small amount of content relatively speaking.
  • They do not exist as a single easy access for all users who are worksharing when using cloud worksharing via Autodesk Docs/BIM360 (becoming very common).

 
Journals catch the same data which is present in the SLOG, work in all Revit environments, and create a log of non-workshared content. They will tell you not just which models were synced with, but how long the user was in this any given model without a sync. They’ll even tell you how long the user was in a given view.
 
They can provide further insights into user actions (who could use some guidance on keyboard shortcuts?), model health (missing elements flag before there are too many), and performance (how often is mode A crashing vs model B?).
 
The only ‘problem’ with journals is that they need to have a LOT more processing as there is a LOT more data. They also need to be grabbed daily, but nothing should overwrite them beyond the look back timeframe.

 

I guess those are some good reasons why I have not heard about slog files being used for this purpose in the past.

 

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open
Message 7 of 9

Hello Jeremy,

 

Thank you for the detailed response.

I was also looking at linking with journals however they live on temp directories on individual machines connected to our network (around 250 employees) so i was trying to use the slog to time stamp and problem solve. 

I do still see value in the using the slog even if it will overwrite as we can still determine when a file is being accessed and should have at least some activity prior to a deadline so there is still value.

I will look at coding the finding of the files, extracting the data and then capturing new data from the slog and appending it to the end of the captured data.

I am currently extracting the slog files from the server daily so that is not the issue.

 

Again, really appreciate the detailed response.

 

I will mark as accepted solution.

 

Thanks Again.

Message 8 of 9

Keep in mind that for cloud worksharing projects the slogs also live on the local disc, so if you want your tool to account for those data sets than you will need to collect those as well. While you may not have any collaboration projects on Autodesk Docs / BIM360 today it’s advisable to account for it in theory at least - otherwise you’ll have large gaps in the data with no plan on how to fill them in.

The slogs can be collected at user log in by simply copying the slog file from the local disc on log in. Check a journal for a user on a cloud worksharing project to confirm the specific location for your various environment(s). This same method is being used by a few offices I know to grab all journals from impacted user(s).
Message 9 of 9

Thank you both very much for the fruitful discussion and insights! Preserved for posterity on the blog:

 

https://thebuildingcoder.typepad.com/blog/2021/12/logging-and-monitoring-deleted-data.html#2

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community