KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
4D Summit: [4D Summit 2016] Take a Journey into Record History [EN]
PRODUCT: 4D | VERSION: 15 R4 | PLATFORM: Mac & Win
Published On: September 15, 2016
This technical article is currently restricted to 4D Summit attendees and Partners Only. Login with your Customer account to have full access to this article!!!
Log In

How much do you know about 4D Log file? Do you want to know what the future holds for it? This presentation uncovers some of the mysteries about 4D Log file and a new feature that adds another dimension of usefulness to it. The log file is not just for recovery anymore. Do you want to look at the frequency of changes to particular records? Do you want to analyze specific users activity? Would it help to step through the past of your entire database? If record history and access analysis are important to you, make sure you join us for this presentation.

Presented by: Add Komoncharoensiri • 4D Inc.

Commented by Daniel A. Ivy on October 3, 2019 at 1:22 PM
Several participants mentioned they use a custom user/password system and this eliminates the ability of 4D to identify and record the modifying username in the log. I have found a workaround for this. If you use your own password and user system, you can make a "hybrid" system by creating a legit 4D user account in your structure (on-the-fly as each user logs in) to match your custom user name. Then immediately use CHANGE CURRENT USER to migrate the custom user from the default 4D user name to your internally generated 4D user name. After that conversion (on the fly with each user login) all modifications in the log will be recorded with 4D user name that matches your custom user name. You don't have to pre-define these 4D users in the USERS editor. A side benefit of this is that you can see user names in the 4D Server admin window, and you can identify your modifying user with code inside triggers without having to store your custom user name in the record. There are some rules you have to follow to create 4D users on the fly, and you might run into some issues with access privileges to plugins on your freshly created 4D users. I hope this helps someone as much as it has helped me. Dan Ivy
Commented by Jody Bevan on June 23, 2017 at 9:09 AM
Very interested in this topic as we are building an audit trail into our SHELL. Great topic. We used to do this another way before log files we available. That worked great but we had to do a lot of code. This is very promising for writing this with very little code, and having high confidence that everything is being audited. Questions though that would be great to be addressed in another KnowledgeBase. 1. Log file is referred to. Is that the .journal or .4BL file? 2. How do we make sure that we import each 'log' file as the log file gets imported, and eventually deleted? Comment: the Audio is hard to make out much of the time. Thanks