manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <daddy...@gmail.com>
Subject Re: Turning on Logging
Date Tue, 24 May 2011 23:31:38 GMT
Check to be sure your properties.xml file didn't get overwritten.  If
you rebuild that can happen.

Karl

On Tue, May 24, 2011 at 3:59 PM,  <hokie@farzad.net> wrote:
> I like the comment idea, my goal is leave a syntax sample somewhere.
>  Updated my source the logging.ini file is fine.
>
> I have a problem with logging, so I don't see any of my log messages at all.
>
> I imported org.apache.manifoldcf.crawler.system.Logging and have the
> following lines in my constructor.  I see the System.out print, but not the
> log message.  Thoughts?
>
>                Logging.connectors.debug("DupFinderConnector Constructor
> Called");
>                System.out.println("DUP CONS CALLED");
>
> Thanks!
>
> On Tue, 24 May 2011 15:41:07 -0400, Karl Wright <daddywri@gmail.com> wrote:
>>
>> The sample app logging.ini file was already updated; if you think it's
>> not right still please open a new ticket for it and attach your patch.
>>
>> Adding the loggers to the properties.xml file is fine by me; the
>> default value is already WARN.  Usually when this is done in other
>> projects people include the appropriate property statement but have it
>> commented out.  Feel free to come up with a separate ticket and patch
>> for that issue, though.
>>
>>
>> Karl
>>
>> On Tue, May 24, 2011 at 3:28 PM,  <hokie@farzad.net> wrote:
>>>
>>> Got it working :) and the threads have ids! can remove my hack.  Thought,
>>> I think it would be nice if the sample app property.xml file had all the
>>> loggers on at warn level.  I also think we should modify the logging.ini
>>> file to contain, the main diff is file spanning and printing out the ids.
>>>  Want me to make a patch?
>>>
>>> log4j.rootLogger=DEBUG, MAIN
>>> log4j.appender.MAIN=org.apache.log4j.RollingFileAppender
>>> log4j.appender.MAIN.File=logs/manifoldcf.log
>>> log4j.appender.MAIN.MaxFileSize=10000KB
>>> log4j.appender.MAIN.MaxBackupIndex=10
>>> log4j.appender.MAIN.layout=org.apache.log4j.PatternLayout
>>> log4j.appender.MAIN.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n
>>>
>>>
>>> On Tue, 24 May 2011 15:20:13 -0400, Karl Wright <daddywri@gmail.com>
>>> wrote:
>>>>
>>>> The rootLogger in the .ini file may be set to DEBUG, but the
>>>> properties.xml loggers explicitly control each subsystem, so those win
>>>> (for subsystems).
>>>>
>>>> Karl
>>>>
>>>>
>>>> On Tue, May 24, 2011 at 3:17 PM,  <hokie@farzad.net> wrote:
>>>>>
>>>>> So then not only I can control the logging from the logging.ini file,
I
>>>>> can
>>>>> control it via the property.  Meaning, if the property is set to WARN,
>>>>> but
>>>>> the ini file says DEBUG for the appender, all I get is WARN?
>>>>>
>>>>> Here is what I have in my .ini file:
>>>>>
>>>>> #Two appenders defined, one for a file log (MAIN) and the other to
>>>>> standard
>>>>> out (STDOUT)
>>>>> log4j.rootLogger=DEBUG, MAIN, STDOUT
>>>>> log4j.appender.MAIN=org.apache.log4j.RollingFileAppender
>>>>> log4j.appender.MAIN.File=logs/manifoldcf.log
>>>>> log4j.appender.MAIN.MaxFileSize=10000KB
>>>>> log4j.appender.MAIN.MaxBackupIndex=10
>>>>> log4j.appender.MAIN.layout=org.apache.log4j.PatternLayout
>>>>> log4j.appender.MAIN.layout.ConversionPattern=%d %5p [%t] (%F:%L) - %m%n
>>>>>
>>>>> log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
>>>>> log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
>>>>> log4j.appender.STDOUT.layout.ConversionPattern=%d %5p [%t] (%F:%L) -
>>>>> %m%n
>>>>>
>>>>>
>>>>> On Tue, 24 May 2011 15:10:16 -0400, Karl Wright <daddywri@gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> <property name="org.apache.manifoldcf.db" value="DEBUG"/>
>>>>>>  <property name="org.apache.manifoldcf.connectors" value="DEBUG"/>
>>>>>>
>>>>>> Karl
>>>>>>
>>>>>> On Tue, May 24, 2011 at 3:08 PM,  <hokie@farzad.net> wrote:
>>>>>>>
>>>>>>> What is the properties.xml line to turn on logging say for connectors
>>>>>>> and
>>>>>>> db.  Is it the following?  Do you say value = true or enabled
or on?
>>>>>>>
>>>>>>> <property name="org.apache.manifoldcf.db" value="true"/>
>>>>>>> <property name="org.apache.manifoldcf.connectors" value="true"/>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Farzad.
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>

Mime
View raw message