Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » [Resolved] Redirect Virgo's Tomcat logs into console(I'm looking for the right configuration to redirect tomact logs to console)
icon14.gif  [Resolved] Redirect Virgo's Tomcat logs into console [message #662210] Tue, 29 March 2011 18:14 Go to next message
Ahmed EL AMINE is currently offline Ahmed EL AMINEFriend
Messages: 13
Registered: March 2011
Location: Casablanca, Morocco
Junior Member
I integrated Virgo web server into Eclipse, but the problem is that tomcat logs are puten in a log file

is there a way to redirect it to Virgo's console on Eclipse ?

Thank you for help

[Updated on: Wed, 30 March 2011 15:42]

Report message to a moderator

Re: Redirect Virgo's Tomcat logs into console [message #662224 is a reply to message #662210] Tue, 29 March 2011 18:38 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Take a look in $VIRGO_HOME/config/serviceability.xml

This is a standard logback configuration file. Modify by adding more appenders and rout as needed

Regards
Dmitry
Re: Redirect Virgo's Tomcat logs into console [message #662321 is a reply to message #662224] Wed, 30 March 2011 09:08 Go to previous messageGo to next message
Ahmed EL AMINE is currently offline Ahmed EL AMINEFriend
Messages: 13
Registered: March 2011
Location: Casablanca, Morocco
Junior Member
thank you for your reply

I opened the mentioned file, but i realize that i'm a newbie and cant figure out witch instructions to add to get the desired result

Re: Redirect Virgo's Tomcat logs into console [message #662336 is a reply to message #662224] Wed, 30 March 2011 09:41 Go to previous messageGo to next message
Ahmed EL AMINE is currently offline Ahmed EL AMINEFriend
Messages: 13
Registered: March 2011
Location: Casablanca, Morocco
Junior Member
i added the following lines to the xml file :
<appender name="SIFTED_LOG_STDOUT" class="ch.qos.logback.classic.sift.SiftingAppender">
		<discriminator>
			<Key>applicationName</Key>
			<DefaultValue>virgo-server</DefaultValue>
		</discriminator>
		<sift>
			<appender name="${applicationName}_LOG_STDOUT" class="org.eclipse.virgo.medic.log.logback.ReroutingAwareConsoleAppender">
				<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
					<Pattern>[%d{yyyy-MM-dd HH:mm:ss.SSS}] %-28.28thread %-64.64logger{64} %X{medic.eventCode} %msg %ex%n</Pattern>
				</encoder>
			</appender>
		</sift>
	</appender>

So now i'm getting all applications logs on console, is there a way to put filter to get just tomcat's logs ?
Re: Redirect Virgo's Tomcat logs into console [message #662390 is a reply to message #662336] Wed, 30 March 2011 13:51 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Which "tomcat" logs are looking at?

Do you want to see logs of the application deployed in tomcat?
Do you want to see actual log statements generated by tomcat code base?
Do you want to see access logs for http requests served by tomcat?


Take a look here for logback documentation => http://logback.qos.ch/manual/index.html

In addition to the appender you will need a <logger/> element.
In logger element you can specify package (i.e. name) attribute) and an appender to use for that package.

Regards,

Dmitry
Re: Redirect Virgo's Tomcat logs into console [message #662425 is a reply to message #662390] Wed, 30 March 2011 15:40 Go to previous message
Ahmed EL AMINE is currently offline Ahmed EL AMINEFriend
Messages: 13
Registered: March 2011
Location: Casablanca, Morocco
Junior Member
thank you very much, your instructions were very useful to me,
i also noticed that there is an option in Virgo's panel:

http://img4.hostingpics.net/pics/120882Capture.png

thank you Mr Dmitry Sklyut
Previous Topic:LogReaderService for Virgo
Next Topic:[NOT POSSIBLE ] Change Embedded Tomcat
Goto Forum:
  


Current Time: Sat Dec 14 11:23:47 GMT 2024

Powered by FUDForum. Page generated in 0.04409 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top