How to create a logs system?

Hello everyone,

I wanted to track some bugs on my app, and decided to create a logs system to track every main action of my app. So I added a local database and added some actions on my buttons to provide informations to this database.

I used the “change field” action, with a “new row” parameter each time. But eventually I realized that this could create what I call “database conflicts” : if my button also modifies another database, adding this “change field” action will cause the effect of the button to malfunction or not function at all. So I record and action in the logs but the action is finally not performed.

So I am wondering : is there and other and more simple way to create some log files or log databases ?

Просто используйте Тригеры, в конце всех действий производите передачу имени действий стороннему объекту, который и будет записывать данные в базу данных
Just use Triggers, at the end of all actions, pass the action name to a third-party object, which will write the data to the database

I tried something yesterday, having a string modified by the action, with an action “when string modified, create new row in database”

But it ended up with hundreds of new rows in the database with just the first record ! :sweat_smile: I guess it wasn’t the right way…

So you think it will works if I do something like :

  • in the event I want to record, add an action "set string LogRecord = “what is happening”
  • add an other action “clic button RecordStringInLog”
  • having this button that records the string with the action ChangeRow in New row


log.flp (20.2 KB)

It works just fine, thank you Vladimir you’re the best !

My mistake was to connect the string to the database : when the databases was updated, so was the string and it updated again the database, it had no end… :sweat_smile:


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.