HOW TO: see the servoy log in the MAC Console

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

HOW TO: see the servoy log in the MAC Console

Postby IT2Be » Tue Nov 24, 2009 11:00 pm

I few years ago (I believe) I found out and published that you can drag the Servoy log file to the console icon in the dock to see the log in the console.

The advantage of having the log file in the console is that you see 'live' updates of what happens to your running Servoy instance.

However, the above method does not make it a permanent thing.

Not so long ago (yes I am still learning) I found out how to make this permanent and want to share that with you as well.

It is quite simple:

1. Open terminal
2. cd to '~/Library/Logs' (in your home folder) or /Library/Logs
3. create a symbolic link with 'ln -s /path/to/your/servoy/log_file.txt symbolic_link_name'
4. (re-)start the console and you will see the log file under '~/Library/Logs' or '/Library/Logs'

When you want to remove the symbolic link you move to the designated folder again and enter 'rm symbolic_link_name'.

I hope you enjoy this (very little) tip :)
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: HOW TO: see the servoy log in the MAC Console

Postby Jan Aleman » Wed Nov 25, 2009 10:54 am

How about: command-O point to the file, done?
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Re: HOW TO: see the servoy log in the MAC Console

Postby IT2Be » Wed Nov 25, 2009 1:05 pm

Not really:

1. it is a text file and opens, in my case, with Smultron (or any other application that you attache the file(type) to).
2. when it opens in console it will only be during that session and you have to add the file to the console after a restart
3. when it does not open in console it will never show you the log entries added after opening the file (unless you refresh or reopen)

Additionally: a 'simple' alias will not do the job either (tested).
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: HOW TO: see the servoy log in the MAC Console

Postby Jan Aleman » Wed Nov 25, 2009 1:19 pm

IT2Be wrote:Not really:

1. it is a text file and opens, in my case, with Smultron (or any other application that you attache the file(type) to).
2. when it opens in console it will only be during that session and you have to add the file to the console after a restart
3. when it does not open in console it will never show you the log entries added after opening the file (unless you refresh or reopen)

Additionally: a 'simple' alias will not do the job either (tested).


Time to reformat your mac then. On mine it works perfect. In console, works after restart, etc. I'm on 10.6.2 plain vanilla.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Re: HOW TO: see the servoy log in the MAC Console

Postby pbakker » Wed Nov 25, 2009 1:29 pm

Dunno if it's the same on MAC, but on Windows just add "-consoleLog" as top entry in the servoy.ini file in the developer directory and redirect all logging to stdout as well by altering the log4j settings in servoy.properties, like
Code: Select all
log4j.rootCategory=INFO, file, configservlet, stdout
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: HOW TO: see the servoy log in the MAC Console

Postby mboegem » Wed Nov 25, 2009 1:32 pm

Although not a Mac user for development (that's where it goes wrong already :wink: ), I'd like my servoy_log_txt very much to be opened & refreshed all the time
As Eclipse already needs a lot of space on the screen, it would be very nice to have this log integrated within Serclipse.
I've filed a feature request already some time ago (#205414).

At this moment I use the 'internal web browser' view in eclipse to point to the file (file://<MYSERVOYFOLDER/........../servoy_log.txt)
This works for me, except that:
1) I need to point to the file after each execution (lucky the webbrowser supports recent locations)
2) It doesn't autorefresh. As in most webbrowsers, this one has a refresh button too.

Anyway, I still hope the feature request will make it, as the servoy_log is a very valueable source when it comes to 'error-free' solutions.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: HOW TO: see the servoy log in the MAC Console

Postby Robert Huber » Sat Nov 28, 2009 10:52 am

Very nice tip Jan I use starting from now on :-) The Mac has so many very useful and ood thought out utilities just built in we tend to use too little. That's where such tips come in very handy :-)

Best regards, Robert

Jan Aleman wrote:How about: command-O point to the file, done?
Robert Huber
7r gmbh, Switzerland
SAN Developer
www.seven-r.ch
User avatar
Robert Huber
 
Posts: 1239
Joined: Tue Aug 23, 2005 6:52 pm
Location: Schaffhausen, Switzerland

Re: HOW TO: see the servoy log in the MAC Console

Postby ROCLASI » Sat Nov 28, 2009 12:12 pm

pbakker wrote:Dunno if it's the same on MAC, but on Windows just add "-consoleLog" as top entry in the servoy.ini file in the developer directory...


On the Mac you'll find this servoy.ini file INSIDE the Servoy.app (in the Finder right-click on the servoy.app and select Show Package Contents. Then under Contents/MacOS/ you will find servoy.ini.
Adding the -consoleLog at the top makes all the Eclipse messages end up (also) in the Console Messages visible in the Console.app.

This tip is actually more for Servoy 4.0/4.1 users. Servoy 5 already has an Error Log view that shows what's in the Eclipse Log.

As for the Servoy Server log you can indeed point your Console.app to it and it will update the moment something comes in. On all the *NIX platforms (Mac included) you can use the terminal and tail -f this file and you see directly what comes in.
As for tail on Windows, for that you need to install some third party tool that does this. Like Tail For Windows. But I am sure there are some GUI log viewers out there that do the same.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: HOW TO: see the servoy log in the MAC Console

Postby IT2Be » Sat Nov 28, 2009 12:21 pm

This tip is actually more for Servoy 4.0/4.1 users. Servoy 5 already has an Error Log view that shows what's in the Eclipse Log.
That depends on how you like to see your log obviously.
I have my console open and in front almost all of time. So, to me it is less obvious to look in the 'Error Log View'.

Did not know about the "-consoleLog" though. Nice to see that I can learn from a "How To" topic that I started myself :)
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany


Return to How To

Who is online

Users browsing this forum: No registered users and 10 guests

cron