Daniele
Members-
Content Count
7 -
Joined
-
Last visited
Community Reputation
0 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I am a developer of management software for catering. I have a project that has been on the market for many years and is currently in use by dozens of clients. After many years I decided to try to sell my project. It is a complete management software for managing a restaurant, the main program works on Windows PCs (7-8-10-11), the program for orders on Android devices up to the latest version available. In addition, it is equipped with a digital menu developed in PHP, Javascript and HTML5 that can be adapted for each client and updated directly from the main program. The digital menu, which can be used from any smartphone, also allows you to send orders directly to the main management software via the Internet. I would naturally give away all the sources of the entire project. If anyone is interested in further details, contact me.
-
I don't know either. AddLog is specifically used to log information when the application throws exceptions. I created a demo that calls cascade procedures and each of these creates its own task and inside I generate an exception to check if it is captured and written to the log. Everything worked both by declaring the procedures involved as public and private. Evidently there is something in my application that disturbs this mechanism. In my application I use iTask to be able to read information from the internet using Indy. The fact that my application now writes logs by simply declaring procedures as private instead of public sounds strange to me too. Unfortunately I can't investigate further at the moment but thanks for your interest.
-
Yes in debug I see going into the procedure and executing everything written without exceptions but it doesn't write anything to the file. I'll definitely follow your suggestion and write a clean, separate program to see what happens. Thanks very much anyway.
-
Sorry but does my code work for you? Ok for ErrorData it is indeed redundant. But I'm very surprised that it works for you. I've tried and tried but I just have no way to make it work. Did you rewrite it? but oh well... Thanks anyway and best regards for the moment.
-
Hello. I'm workin with Delphi 10.4.2 community in Windows 10/11. I've this procedure procedure TfrmMain.AddLog(NomeProc, PointProc, Datis: string; MarckEX: boolean); var ErrorLogFileName : string; ErrorFile : TextFile; markec : string; begin ErrorLogFileName := ExtractFilePath(ParamStr(0))+'error.log'; AssignFile(ErrorFile, ErrorLogFileName) ; if FileExists(ErrorLogFileName) then Append(ErrorFile) else Rewrite(ErrorFile) ; try if MarckEX then begin markec := '***;'; end else begin markec := '---;' end; ErrorData := DateTimeToStr(Now) + ';' + NomeProc + ';' + PointProc + ';' + Datis + ';' + markec; WriteLn(ErrorFile,ErrorData) ; finally CloseFile(ErrorFile) end; end; And I've this Task (simple method to work in another thread) called in a button click TASK := TTask.Create( procedure begin //do some work and then.... call AddLog.. AddLog('Test','Test','Test',false); end ); TASK.Start(); If I call AddLog into TASK do not work. I tried to call AddLog in and out to TASK := TTask.Create( procedure begin //do some work and then.... call AddLog.. TThread.Synchronize(nil, procedure begin AddLog('Test','Test','Test',false); end ); end ); TASK.Start(); but without success, nothing is ever written to the file. What am I doing wrong?