Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Log command

Author
Message
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 27th Jun 2013 21:08
Can someone explain to me what the Log(szMessage) command does?

http://www.appgamekit.com/documentation/Reference/Error/Log.htm

Help file says it "Displays the specified text to the appropriate device log or output window."

I would think that this would be the Compile Log window in the editor., but there's nothing there.

Also, in the help file, the command says szMessage but the parameter is Message. Is that a typo?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jun 2013 21:31
Yes, it appears to be a typo dropping the 'sz'.

I don't think it goes to the Compile log.

I am betting that it goes to the 'output' log in Xcode (when running an app started from it) and to the LogCat log on Android.

I don't know where it would go in Windows.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 27th Jun 2013 23:45
Thanks AL.

I wish it did output to the Compile Log or some other log built into the editor.

I'm using the manual method right now which creates a text file in the documents\agk\Appname folder.

I'm trying to log my network traffic to diagnose a problem but it keeps crashing because it occasionally tries to write to the log while the last log has not finished closing yet.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 28th Jun 2013 01:37
It's a freedom engine thing I think, that log command.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Jun 2013 05:12
Scab, are you in Tier 1 or Tier 2?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 28th Jun 2013 05:40
Tier 1.

With Dark Basic, I used to use a program called DebugView. Worked great.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 28th Jun 2013 09:24
On Windows it probably writes to StdErr or StdOut. Try looking at the system log.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 28th Jun 2013 09:26
if you open close the file for each log you should see all extrys.
maybe you create a net message with int/float/string but
you read it in wrong order.
write string but read float or something.
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 5th Jul 2013 00:26
@JimHawkins
Thanks, I looked at all of the logs in Event Viewer and - nothing.

@Markus
I am sending 3 integers and the data is transmitting fine. I just want to log it. In my log code I'm creating a string: msg$="Seconds:"+str(Sec)
and then using writeLine(debugFile,msg$)

It works up to a point when there are too many updates and then the app crashes.

Anyone from TGC know what Log() does in Windows?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Jul 2013 09:11
you said you did not see the last entry, when you close
the file with id debugFile?
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 5th Jul 2013 20:50
I'm not sure if the last entry gets closed because I'm not sure at what point the app crashes. If there was a step-through mode I could tell, but right now programming in AppGameKit is like programming blind. Thankfully Debugging is getting put into v2.

I'd rather not use a text file for debugging purposes.

I'm going to try using ProcMon to monitor network traffic from the processes.

Thanks.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Jul 2013 21:57
if you not close the file you will not see the whole content,
this why i said open/write/close at once for your log file

yes,debugging is fine.
but the most errors you can also find by print something on screen
or reread the code.

Login to post a reply

Server time is: 2024-05-03 08:27:30
Your offset time is: 2024-05-03 08:27:30