I believe that Get 4D Folder works for this sort of thing I would think either: 4D folder, or Log folder
Chip On Tue, 9 Oct 2018 09:50:48 -0600, Jody Bevan via 4D_Tech wrote: > In my previous 26+ years of 4D coding I did not have to concern > myself with the same computer being used by different computer users > (By this, I mean the user signed into the computer). Part of that was > that long ago, people just didn’t sign out of the computer, and then > the next person sign in as themselves. For most of our users our > application looked after the security, and our application was the > only thing running on the workstations. So even when tracking, > logging of who changed what, and security of who could access what, > was all handled within our application. Therefore the ‘computer user > ’ was never changed. > > Now having left that world, I am now confronted with having to deal > with the very likely situation where the people on the computer will > be signing out from the computer when they walk away, and when a > different person uses the computer they will be signing in as > themselves. > > I love writing logs to the local computer while it is running. These > log files are for the programmers to know what is occurring on the > computer. Typically these logs are turned off when there are no > problems in the application. They are used extensively when an > application is first handed to the users in Alpha or beta form. This > way we know much better where the problems are, often being able to > fix the issue before they even report it to us. These files do not > contain sensitive data. > > Last week I decided I should actually test this out with switching > computer users. > > On the MacOS we have been writing this information we write to the > Shared folder. The pathname would be: > > ~/Users/Shared/ApplicationName/Logs/LogFileName.txt > > On Windows it would be: > > ~/Users/Public/ApplicationName/LogFileName.txt > > This has been working great when I am signed in as myself, or if the > computer user does not changed. > A quick check in Terminal shows me the directories and files are > created, and I can write to them as needed. > -rw-r―r― > Or in Octal format 644 > > This is fine for the currently signed in user, but not for other users. > > Not a problem I am thinking, I will just call terminal from within 4D > at startup and use the chmod command to change the permissions of the > folders and files if they are not read write for all users. > > I suspect I am doing something stupid because it is not working. > > Questions: > > 1. Is this the right location I should be saving this kind of information? > 2. Is my logic and steps correct and I am obviously not writing my > terminal commands right? > 3. Or, rather is it - Dah, no don’t do it that way do it this way? > > Thanks > > Jody > > > Jody Bevan > Developer > > +1 587-487-6120 > > > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** --------------- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************