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 » Community » Newbie corner » RLOG in Linux
RLOG in Linux [message #50284] Wed, 12 September 2018 12:56 Go to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi there,
I added a RLOG line to an application. In Windows I find the logs in a .log file inside the directory of the application. In Linux there is no such .log file and I expected to find the log in /var/log/messages or in /var/log/syslog, but I do not find anything there. The Linux box is a Debian Stretch, if this is relevant.
Ciao,
gio
Re: RLOG in Linux [message #50285 is a reply to message #50284] Wed, 12 September 2018 19:16 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Log file is created by default in $HOME/.upp/APP_NAME/APP_NAME.log
Re: RLOG in Linux [message #50298 is a reply to message #50285] Fri, 14 September 2018 10:45 Go to previous messageGo to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi Zbych,
I do not find .upp in $HOME, it should be created manually before launching the application?
Re: RLOG in Linux [message #50299 is a reply to message #50298] Fri, 14 September 2018 13:54 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
.upp is created automatically AFAIK. Make sure that you display hidden directories (Ctrl-h in nautilus or ls -la $HOME in terminal)
Re: RLOG in Linux [message #50301 is a reply to message #50299] Fri, 14 September 2018 16:11 Go to previous messageGo to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
I just checked and did not find any .upp directory. I have noticed instead that in /var/log/messages there is a bunch of those logging entries. Strange thing, the system logged them all at the same moment (09:29:29 AM ) even if they have been generated in different moments (I know when they have been generated because I log also the date and time). It seems like they have been in some sort of cache since some event made the application to log them all together. Maybe after ROLOG() I have to put DUMP() or something else?
Re: RLOG in Linux [message #50303 is a reply to message #50301] Fri, 14 September 2018 22:23 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

In your home directory there should be .upp directory (this is also the place when TheIDE configuration is stored). You can look at my home directory listing:
[klugier@klugier-X470-Pro ~]$ ls -la | grep .upp
drwxr-xr-x 21 klugier klugier   4096 08-19 00:46 .upp
drwxr-xr-x  7 klugier klugier   4096 09-08 14:52 upp
drwxr-xr-x 27 klugier klugier   4096 08-19 00:45 upp.out


Can you execute the same command in your home (~) directory? Alternatively, you could mess with the users and the directory is created somwhere else in the system for example roots home directory. Please check and let me know everything works as expected.

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: RLOG in Linux [message #50307 is a reply to message #50303] Mon, 17 September 2018 11:10 Go to previous messageGo to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi Klugier,
I have no .upp directory in user's home directory, in /root or in /usr/bin (where the program is installed). I have issued a find command in the whole file system with no results. Instead, I have the log messages in /var/log/messages and in /var/log/syslog, but they are logged not immediately, but in bulk after some time: e.g. I have in the /var/log/messages a bunch of logs with the same timestamp, but the log messages have been issued on different moments.

This is my code:

	Value time = GetSysTime();
	String timestamp = time.ToString();
	RLOG("LineDashboard " + timestamp + " label selected");


And this is what I have in /var/log/messages:

Sep 14 09:29:53 myhost  LineDashboard.desktop[820]: LineDashboard 14/09/2018 08:29:53 label selected
Sep 14 09:29:53 myhost  LineDashboard.desktop[820]: LineDashboard 14/09/2018 08:39:53 label selected
Sep 14 09:29:53 myhost  LineDashboard.desktop[820]: LineDashboard 14/09/2018 08:49:53 label selected
Sep 14 09:29:53 myhost  LineDashboard.desktop[820]: LineDashboard 14/09/2018 08:59:53 label selected
Sep 14 09:29:53 myhost  LineDashboard.desktop[820]: LineDashboard 14/09/2018 09:09:53 label selected
Sep 14 09:29:53 myhost  LineDashboard.desktop[820]: LineDashboard 14/09/2018 09:19:53 label selected


The application has been compiled with upp-2018.1 on a Debian Stretch with a recent version of gcc (I do not remember the specific version, but is the one in the debian repository, so it should be recent) and it runs on a Debian Stretch (a different box with no toolchains).

Regards,
gio
Re: RLOG in Linux [message #50308 is a reply to message #50307] Mon, 17 September 2018 11:28 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hello Giorgio,

I have no .upp directory in user's home directory, 


AFAIK, this directory is available (and may (?) have another name) if you have U++/Theide deployed on your machine.
A simple way to find that directory:

Open TheIde, run your application (or any example code) once, via TheIde, and then select TheIde->Build (menu) -> Open ouput directory from the menu.

By default, that directory should be under the .upp (or whatever its name is)

Best regards,
Oblivion


[Updated on: Mon, 17 September 2018 11:28]

Report message to a moderator

Re: RLOG in Linux [message #50332 is a reply to message #50308] Wed, 26 September 2018 12:37 Go to previous messageGo to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi Oblivion,
you are right: on the development I have the .upp directory with the log, but on the client machine there is no .upp directory.
Reagards,
gio
Re: RLOG in Linux [message #50353 is a reply to message #50332] Wed, 03 October 2018 10:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Giorgio wrote on Wed, 26 September 2018 12:37
Hi Oblivion,
you are right: on the development I have the .upp directory with the log, but on the client machine there is no .upp directory.
Reagards,
gio


How do you check?

Now please forgive stupid question, but are you aware that filenames starting with '.' are hidden and normally shown e.g. with GUI shells?
Re: RLOG in Linux [message #50354 is a reply to message #50353] Wed, 03 October 2018 10:18 Go to previous messageGo to next message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi Mirek,
I am aware of the '.' thing. Actually, I did not even use a graphical interface: I use ssh from my pc, so users can continue work on the client. So I used ls -a to check. I even issued the command find / -iname "*.upp*" to check in the whole filesystem for an .upp directory but found nothing.
Re: RLOG in Linux [message #50357 is a reply to message #50354] Wed, 03 October 2018 13:55 Go to previous message
omari is currently offline  omari
Messages: 264
Registered: March 2010
Experienced Member
Hi Giorgio,

you can use StdLogSetup() to controle logging.

for example
StdLogSetup(LOG_FILE | LOG_SYS);
in order to send logging to the ~/.upp/appname/appnam.log file, and to /var/log/appname.log

you can set the logfilepath as second param of StdLogSetup :
StdLogSetup(LOG_FILE , "/home/user/appname.log");



regards
omari.
Previous Topic: I don't understand Moveable
Next Topic: Casting from std::string to String
Goto Forum:
  


Current Time: Fri Mar 29 13:49:20 CET 2024

Total time taken to generate the page: 0.01839 seconds