Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » log-file is empty
log-file is empty [message #52078] Tue, 16 July 2019 17:48 Go to next message
slashupp is currently offline  slashupp
Messages: 193
Registered: July 2009
Experienced Member
using linux
upp svn 13011

what do I need to do to get a properly populated log-file?
when I press Alt+L all it contains is my project output location (upp.out/...) and the line
****************** PANIC: Invalid memory access!

Re: log-file is empty [message #52079 is a reply to message #52078] Wed, 17 July 2019 00:47 Go to previous messageGo to next message
Xemuth is currently offline  Xemuth
Messages: 132
Registered: August 2018
Location: France
Experienced Member
Hello, put
StdLogSetup(LOG_COUT|LOG_FILE);
at Begining of your code


Re: log-file is empty [message #52080 is a reply to message #52078] Wed, 17 July 2019 00:49 Go to previous messageGo to next message
Xemuth is currently offline  Xemuth
Messages: 132
Registered: August 2018
Location: France
Experienced Member
No Message Body

[Updated on: Wed, 17 July 2019 00:49]

Report message to a moderator

Re: log-file is empty [message #52081 is a reply to message #52078] Wed, 17 July 2019 10:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
slashupp wrote on Tue, 16 July 2019 17:48
using linux
upp svn 13011

what do I need to do to get a properly populated log-file?
when I press Alt+L all it contains is my project output location (upp.out/...) and the line
****************** PANIC: Invalid memory access!



Well, did you add any LOGs to populate it?

Normally, logfile is empty, unless you put something there.

Also, LOG only works in debug mode, in release it is excluded from the final code.

Mirek
Re: log-file is empty [message #52083 is a reply to message #52081] Wed, 17 July 2019 10:35 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 193
Registered: July 2009
Experienced Member
mirek Smile seems we were trying to do the same question at the exact same moment & the forum-tool couldn't handle it Smile
I started a second question, maybe you should delete that one

Quote:
Normally, logfile is empty, unless you put something there.

Also, LOG only works in debug mode, in release it is excluded from the final code.


(my app does keep it's own logging and there is no problem with that)

I want the log-output from theide/upp specifically this: https://www.ultimatepp.org/srcdoc$Core$Leaks_en-us.html

In response to Xemuth:
Quote:

Hello, put

StdLogSetup(LOG_COUT|LOG_FILE);

at Begining of your code



this does not work..
I placed the call in:
Code: [Select all] [Show/ hide]

GUI_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
...
}

I check the expected logfile at $HOME/.upp/appname/appname.log both direct and using Alt+L
and it remains unchanged.

I checked GetStdLogPath(); both before and after the call to StdLogSetup(..) and it also is empty.

How do I get the logfile to be generated/populated?

[Updated on: Wed, 17 July 2019 10:38]

Report message to a moderator

Re: log-file is empty [message #52088 is a reply to message #52083] Wed, 17 July 2019 20:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
slashupp wrote on Wed, 17 July 2019 10:35
mirek Smile seems we were trying to do the same question at the exact same moment & the forum-tool couldn't handle it Smile
I started a second question, maybe you should delete that one

Quote:
Normally, logfile is empty, unless you put something there.

Also, LOG only works in debug mode, in release it is excluded from the final code.


(my app does keep it's own logging and there is no problem with that)

I want the log-output from theide/upp specifically this: https://www.ultimatepp.org/srcdoc$Core$Leaks_en-us.html


Are you trying to catch leaks?

    StdLogSetup(LOG_COUT|LOG_FILE);


Just to provide correct explanation of above code: It sets log to output both to console AND log-file. However, the default is to output to log (so above just adds output to the console).
Re: log-file is empty [message #52098 is a reply to message #52088] Fri, 19 July 2019 08:58 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 193
Registered: July 2009
Experienced Member
StdLogSetup(LOG_FILE); - set in GUI_APP_MAIN

$HOME/.upp/theide/theide.log is empty ..
logfile in $HOME/.upp/myapp/myapp.log is empty ..

Quote:
Are you trying to catch leaks?

Yes

What do I need to do to get the log?

[Updated on: Fri, 19 July 2019 08:59]

Report message to a moderator

Re: log-file is empty [message #52103 is a reply to message #52098] Fri, 19 July 2019 16:55 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
slashupp wrote on Fri, 19 July 2019 08:58
StdLogSetup(LOG_FILE); - set in GUI_APP_MAIN

$HOME/.upp/theide/theide.log is empty ..
logfile in $HOME/.upp/myapp/myapp.log is empty ..

Quote:
Are you trying to catch leaks?

Yes

What do I need to do to get the log?


Most likely explanation is that no log is produced.

Have tried to put LOG("Hello world") at the beginning of APP_MAIN ?

Mirek
Re: log-file is empty [message #52111 is a reply to message #52103] Sat, 20 July 2019 10:17 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 193
Registered: July 2009
Experienced Member

1. LOG works fine but shows only what I test it with and not the debug info I want.

2. I defined TESTLEAKS, HEAPDBG, COMPILER_GCC, UPP_HEAP in the "Package organizer" for my app
but it had no effect

3. I used 'StdLogSetup(LOG_FILE|LOG_DBG|LOG_APPEND);' in GUI_APP_MAIN - no effect

(each time I made changes I did a 'rebuild all')

4. Where would this debug-logfile be created? I check in .upp/myapp, .upp/theide, upp.out/myapp-path/GCC...
anywhere else?

Re: log-file is empty [message #52118 is a reply to message #52111] Sun, 21 July 2019 11:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
slashupp wrote on Sat, 20 July 2019 10:17

1. LOG works fine but shows only what I test it with and not the debug info I want.


Then it means no leaks were logged. How have you came to conclusion that you have leaks?

Quote:

2. I defined TESTLEAKS, HEAPDBG, COMPILER_GCC, UPP_HEAP in the "Package organizer" for my app
but it had no effect


Yeah, those are irrelevant. The only thing matters is whether it is Debug or Release build and whether U++ heap is active (no USEMALLOC flag).

Quote:

4. Where would this debug-logfile be created? I check in .upp/myapp, .upp/theide, upp.out/myapp-path/GCC...
anywhere else?


It is the same file as the one where LOG output goes => you have the correct file.

Mirek
Re: log-file is empty [message #52122 is a reply to message #52118] Mon, 22 July 2019 07:58 Go to previous messageGo to next message
slashupp is currently offline  slashupp
Messages: 193
Registered: July 2009
Experienced Member

Quote:
Then it means no leaks were logged. How have you came to conclusion that you have leaks?


it is a random occurrence - that's why it is hard to locate, the same actions does not produce it consistently (one of those..)

I just want to be sure that the log works for when it happens again
if it doesn't I will report back here..

thx for your help
Re: log-file is empty [message #52123 is a reply to message #52122] Mon, 22 July 2019 09:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
slashupp wrote on Mon, 22 July 2019 07:58

Quote:
Then it means no leaks were logged. How have you came to conclusion that you have leaks?


it is a random occurrence - that's why it is hard to locate, the same actions does not produce it consistently (one of those..)



Well, those breakpoints only work for "stable" leaks anyway....
Re: log-file is empty [message #52129 is a reply to message #52122] Mon, 22 July 2019 23:16 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 801
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor

you can test both the log and memory leak working just by doing some leak intentionally, like
`new int[10];` in main(..) or something like that.
Previous Topic: icon.rc dont work anymore since last theIDE version
Next Topic: How to inspect memory at pointer-address while debugging
Goto Forum:
  


Current Time: Wed Nov 20 18:56:30 CET 2019

Total time taken to generate the page: 0.02091 seconds