You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Vicson Victor <vv...@ntrs.com> on 2008/05/29 22:37:45 UTC

Problem with custom receiver in chainsaw

Hi Guys,

I am trying to set up a custom receiver inside chainsaw and it is giving 
me this error message. Any help is highly appreciated.

Level 
ERROR 
Logger 
org.apache.log4j.chainsaw.receivers.PluginPropertyEditorPanel 
Time 
2008-05-29 15:14:00,449 
Thread 
Chainsaw-WorkerThread 
Message 
Error reading value for PropertyDescriptor 
java.beans.PropertyDescriptor@54efc925
NDC 
null 
Class 
? 
Method 

Line 

File 

Properties 
{{hostname,chainsaw}{log4jid,114}{application,log}} 
Throwable 


The xml file which I load as default configuration is below:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" 
debug="true">
  <appender name="A2" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.SimpleLayout"/>
  </appender>

  <plugin name="sampleElsOverSshReceiver" 
class="com.ntrs.util.ElsOverSshReceiver">
     <param name="files" 
value="/usr/appl/idm/runtime/idm_admin/els_xml.log"/>
     <param name="host" value="uchitl808"/>
     <param name="tailing" value="true"/> 
     <param name="threshold" value="DEBUG"/> 
  </plugin>

  <root>
      <level value="debug"/>
  </root>
</log4j:configuration>

com.ntrs.util.ElsOverSshReceiver is my custom class and I am able to see 
it on the left side explorer inside the chainsaw interface. But it is not 
able to load the events, or I dont know why it is not able to process 
further.

Thanks in advance.



_______________________________________________________________________________
Vicson Victor | Contractor | Information Security 
840 S Canal St, Chicago, IL 60607, US | phone 1-312-630-6768 | 
vv22@ntrs.com 
Please visit northerntrust.com 
CONFIDENTIALITY NOTICE: This communication is confidential, may be 
privileged and is meant only for the intended recipient. If you are not 
the intended recipient, please notify the sender ASAP and delete this 
message from your system.

IRS CIRCULAR 230 NOTICE: To the extent that this message or any attachment 
concerns tax matters, it is not intended to be used and cannot be used by 
a taxpayer for the purpose of avoiding penalties that may be imposed by 
law. For more information about this notice, see 
http://www.northerntrust.com/circular230

P Please consider the environment before printing this e-mail.

RE: [Chainsaw] Can we stream events from two log files into the same tab

Posted by Scott Deboy <sd...@comotivsystems.com>.
You have a couple of options:
- Change the system-wide 'tab identifier'
Events are routed to chainsaw based on the fields in the event.  The
default tab identifier is 'PROP.hostname - PROP.application', meaning
each event is examined for a 'hostname' and 'application' properties,
and the values are concatenated together with a ' - ', and whatever
value that is, that's the tab that event goes to.  

See the tutorial (from the help menu) for a list of valid identifiers.

I believe the file-based receivers hijack the hostname and application
properties in order to build a tab that makes sense, so you would
probably need to use some other event attribute or property.

You could use LEVEL as the tab identifier (you'd get one tab for each
level).  You can even use EVENTS as a tab identifier (all events from
all sources go to a single EVENTS tab).

- create a new tab that is a 'view' of events on other tabs
Use the 'view, create custom expression logpanel' menu and build an
expression (again, see the tutorial) that will collect your events from
the two log files into a single tab (usually an expression like 'logger
~= com.yourcompany' will work).

Hope that helps

Scott



Scott Deboy
Principal Engineer
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201
Office: 503.224.7496
Direct Line: 503.821.6482
Cell: 503.997.1367
Fax: 503.222.0185
sdeboy@comotivsystems.com
www.comotivsystems.com


-----Original Message-----
From: Vicson Victor [mailto:vv22@ntrs.com] 
Sent: Friday, May 30, 2008 9:27 AM
To: Log4J Users List
Subject: [Chainsaw] Can we stream events from two log files into the
same tab

Hi All,

I am able to stream log events from xml log files over SSH, but I would 
like to stream events from two different log files into the same tab on 
chainsaw.

I do not know how to do it, can anyone help me please?

Thanks a lot.
Vicson.

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


RE: [BULK] Problem with custom receiver in chainsaw

Posted by Vicson Victor <vv...@ntrs.com>.
Thanks for your response Scott. I am checking it out.

Meanwhile, Is there any documentation available which would guide me on 
using a custom receivers, like the set of steps/requirements etc.


_______________________________________________________________________________
Vicson Victor | Contractor | Information Security 
840 S Canal St, Chicago, IL 60607, US | phone 1-312-630-6768 | 
vv22@ntrs.com 
Please visit northerntrust.com 
CONFIDENTIALITY NOTICE: This communication is confidential, may be 
privileged and is meant only for the intended recipient. If you are not 
the intended recipient, please notify the sender ASAP and delete this 
message from your system.

IRS CIRCULAR 230 NOTICE: To the extent that this message or any attachment 
concerns tax matters, it is not intended to be used and cannot be used by 
a taxpayer for the purpose of avoiding penalties that may be imposed by 
law. For more information about this notice, see 
http://www.northerntrust.com/circular230

P Please consider the environment before printing this e-mail.



"Scott Deboy" <sd...@comotivsystems.com>
05/29/2008 03:45 PM
Please respond to
"Log4J Users List" <lo...@logging.apache.org>


To
"Log4J Users List" <lo...@logging.apache.org>
cc

Subject
RE: [BULK]  Problem with custom receiver in chainsaw






You probably need a com.ntrs.util.ElsOverSshReceiverBeanInfo class.  See 
MulticastReceiver and MulticastReceiverBeanInfo for examples:
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/



Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:      503.224.7496
Cell:           503.997.1367
Fax:            503.222.0185

sdeboy@comotivsystems.com

www.comotivsystems.com



-----Original Message-----
From: Vicson Victor [mailto:vv22@ntrs.com]
Sent: Thu 5/29/2008 1:37 PM
To: log4j-user@logging.apache.org
Subject: [BULK]  Problem with custom receiver in chainsaw
 
Hi Guys,

I am trying to set up a custom receiver inside chainsaw and it is giving 
me this error message. Any help is highly appreciated.

Level 
ERROR 
Logger 
org.apache.log4j.chainsaw.receivers.PluginPropertyEditorPanel 
Time 
2008-05-29 15:14:00,449 
Thread 
Chainsaw-WorkerThread 
Message 
Error reading value for PropertyDescriptor 
java.beans.PropertyDescriptor@54efc925
NDC 
null 
Class 
? 
Method 

Line 

File 

Properties 
{{hostname,chainsaw}{log4jid,114}{application,log}} 
Throwable 


The xml file which I load as default configuration is below:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" 
debug="true">
  <appender name="A2" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.SimpleLayout"/>
  </appender>

  <plugin name="sampleElsOverSshReceiver" 
class="com.ntrs.util.ElsOverSshReceiver">
     <param name="files" 
value="/usr/appl/idm/runtime/idm_admin/els_xml.log"/>
     <param name="host" value="uchitl808"/>
     <param name="tailing" value="true"/> 
     <param name="threshold" value="DEBUG"/> 
  </plugin>

  <root>
      <level value="debug"/>
  </root>
</log4j:configuration>

com.ntrs.util.ElsOverSshReceiver is my custom class and I am able to see 
it on the left side explorer inside the chainsaw interface. But it is not 
able to load the events, or I dont know why it is not able to process 
further.

Thanks in advance.



_______________________________________________________________________________
Vicson Victor | Contractor | Information Security 
840 S Canal St, Chicago, IL 60607, US | phone 1-312-630-6768 | 
vv22@ntrs.com 
Please visit northerntrust.com 
CONFIDENTIALITY NOTICE: This communication is confidential, may be 
privileged and is meant only for the intended recipient. If you are not 
the intended recipient, please notify the sender ASAP and delete this 
message from your system.

IRS CIRCULAR 230 NOTICE: To the extent that this message or any attachment 

concerns tax matters, it is not intended to be used and cannot be used by 
a taxpayer for the purpose of avoiding penalties that may be imposed by 
law. For more information about this notice, see 
http://www.northerntrust.com/circular230

P Please consider the environment before printing this e-mail.


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

[Chainsaw] Can we stream events from two log files into the same tab

Posted by Vicson Victor <vv...@ntrs.com>.
Hi All,

I am able to stream log events from xml log files over SSH, but I would 
like to stream events from two different log files into the same tab on 
chainsaw.

I do not know how to do it, can anyone help me please?

Thanks a lot.
Vicson.

RE: [BULK] Problem with custom receiver in chainsaw

Posted by Scott Deboy <sd...@comotivsystems.com>.
You probably need a com.ntrs.util.ElsOverSshReceiverBeanInfo class.  See MulticastReceiver and MulticastReceiverBeanInfo for examples:
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/


Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:      503.224.7496
Cell:           503.997.1367
Fax:            503.222.0185

sdeboy@comotivsystems.com

www.comotivsystems.com



-----Original Message-----
From: Vicson Victor [mailto:vv22@ntrs.com]
Sent: Thu 5/29/2008 1:37 PM
To: log4j-user@logging.apache.org
Subject: [BULK]  Problem with custom receiver in chainsaw
 
Hi Guys,

I am trying to set up a custom receiver inside chainsaw and it is giving 
me this error message. Any help is highly appreciated.

Level 
ERROR 
Logger 
org.apache.log4j.chainsaw.receivers.PluginPropertyEditorPanel 
Time 
2008-05-29 15:14:00,449 
Thread 
Chainsaw-WorkerThread 
Message 
Error reading value for PropertyDescriptor 
java.beans.PropertyDescriptor@54efc925
NDC 
null 
Class 
? 
Method 

Line 

File 

Properties 
{{hostname,chainsaw}{log4jid,114}{application,log}} 
Throwable 


The xml file which I load as default configuration is below:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration >
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" 
debug="true">
  <appender name="A2" class="org.apache.log4j.ConsoleAppender">
      <layout class="org.apache.log4j.SimpleLayout"/>
  </appender>

  <plugin name="sampleElsOverSshReceiver" 
class="com.ntrs.util.ElsOverSshReceiver">
     <param name="files" 
value="/usr/appl/idm/runtime/idm_admin/els_xml.log"/>
     <param name="host" value="uchitl808"/>
     <param name="tailing" value="true"/> 
     <param name="threshold" value="DEBUG"/> 
  </plugin>

  <root>
      <level value="debug"/>
  </root>
</log4j:configuration>

com.ntrs.util.ElsOverSshReceiver is my custom class and I am able to see 
it on the left side explorer inside the chainsaw interface. But it is not 
able to load the events, or I dont know why it is not able to process 
further.

Thanks in advance.



_______________________________________________________________________________
Vicson Victor | Contractor | Information Security 
840 S Canal St, Chicago, IL 60607, US | phone 1-312-630-6768 | 
vv22@ntrs.com 
Please visit northerntrust.com 
CONFIDENTIALITY NOTICE: This communication is confidential, may be 
privileged and is meant only for the intended recipient. If you are not 
the intended recipient, please notify the sender ASAP and delete this 
message from your system.

IRS CIRCULAR 230 NOTICE: To the extent that this message or any attachment 
concerns tax matters, it is not intended to be used and cannot be used by 
a taxpayer for the purpose of avoiding penalties that may be imposed by 
law. For more information about this notice, see 
http://www.northerntrust.com/circular230

P Please consider the environment before printing this e-mail.