logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Deboy" <sde...@comotivsystems.com>
Subject RE: need help to use chainsaw VFSLogFilePatternReceiver
Date Sat, 12 Aug 2006 20:00:01 GMT
promptForUserInfo is in SVN, but it's not yet released (not available through the Chainsaw
bundle download or Web Start).  

For those who don't know what this feature does, it allows you to define VFS URLs which require
credentials, but you can leave out the credentials and get a GUI prompt for username password
- you'll no longer need to embed your credentials in your chainsaw config file.

The prompt for username/password is a GUI window, so use of this feature outside of Chainsaw
(command line or framework) would require some refactoring.

I've also added the receiver name as a property when events are created by LogFilePatternReceiver
(and VFS version).  This means you could use this property to create tabs in Chainsaw.  

It might be useful to some folks if we added this capability to all log4j 1.3 receivers (maybe
make it optional through a param?).  Thoughts?

Scott

-----Original Message-----
From: Jacob Kjome [mailto:hoju@visi.com]
Sent: Fri 8/11/2006 10:14 PM
To: Log4J Users List
Subject: Re: need help to use chainsaw VFSLogFilePatternReceiver
 
At 04:57 AM 8/11/2006, you wrote:
 >Scott and Jake,
 >Thanks to your help, now it works,
 >It seems that my fileURL was not containing the complete host-domain
 >name (it works for pscp with only the hostname but not with
 >chainsaw/jsch).
 >

Glad to hear you go it working.  However, I would bet that you were 
only able to use the partial domain name with pscp because you had a 
profile set up in Putty where the profile name mapped to the real 
full domain name and maybe even a private key that could perform 
auto-login.  I always name my putty profiles identical to my full 
domain name so that I don't get confused.

 >If Scott has information about the PromptForUserInfo availability, I'm
 >still interested.
 >

Yes, I'd be interested as well.  I wonder if it hasn't yet gotten 
into a released version of Chainsaw, although if it is mentioned in 
the docs for the release you have, one would assume that the 
functionality also exists in that release.

Jake

 >Thanks a lot,
 >Bruno
 >
 >******************************************
 >Here are my installation/config notes (if it could help someone to use
 >the VFSLogFilePatternReceiver):
 >
 >Use chainsaw VFSLogFilePatternReceiver on a windows machine to see
 >remote files on a linux server:
 >
 >- install chainsaw-bundle (unzip the chainsaw-bundle.zip) and
 >start/stop it (for the .chainsaw directory to be created in the user's
 >Home directory).
 >
 >- create a plugins directory in %Home\.chainsaw\ and copy the
 >following jars in it:
 >commons-loggin-xxx.jar, commons-net-xxx.jar, commons-vfs-xxx.jar,
 >jakarta-oro-xxx.jar, jsch-xxx.jar, log4j-chainsaw-vfs.jar (see the
 >chainsaw documentation page for urls to download the jars)
 >
 >- If it does not exist, create a known_hosts file in the %HOME/.ssh
 >(to create the .ssh directory on windows, use the ms-dos command as
 >windows explorer does not allow it). In the known_hosts file create a
 >line for the remote host containing the log files to be read (use a
 >ssh client, create it by copying the line from a linux server or use
 >the class Jake provide in previous thread).
 >Rk: as putty use registry keys to store known_hosts, it doesn't create
 >lines in the known_hosts file
 >
 >- define the VFSLogFilePatternReceiver in your chainsaw configuration file:
 >for example, add the following lines to your-config-file.xml:
 >  <plugin name="VFSLogFilePatternReceiverNoUserInfoPrompt"
 >class="org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver">
 >     <param name="fileURL"
 >value="sftp://user:password@host.domain:22/path/to/file/logfile.ext>
 >     <param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/>
 >     <param name="logFormat" value="TIMESTAMP LEVEL [LOGGER] MESSAGE"/>
 >     <param name="name" value="sampleLogFilePatternReceiver"/>
 >     <param name="tailing" value="true"/>
 >   </plugin>
 >(the LogFormat param value has to match your logfile's format, see
 >Help -> Receiver Javadoc->org...LogFilePatternReceiver in chainsaw for
 >more info about the log format)
 >
 >- the host.domain in the fileURL has to be the complete hostname and
 >has to match exactly with the line in the known_hosts file
 >
 >- start chainsaw
 >
 >- in the application-wide preferences, check "Ok to remove
 >SecurityManager" and set your config-file URL in the Automatic
 >Configuration URL (for example
 >file:///C:/config_chainsaw/chainsaw-jboss.xml)
 >
 >- stop and start chainsaw
 >
 >- the tab corresponding to the remote file should appear in chainsaw.
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
 >For additional commands, e-mail: log4j-user-help@logging.apache.org
 >
 >
 > 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org




Mime
View raw message