You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Jerry Malcolm <te...@malcolms.com> on 2019/09/17 20:34:28 UTC

log4j Configuration

For the problem du jour.... when I start JAMES, all of the expected log 
files get created.  The main log output  goes to the console and to the 
james-server.log file as expected.  No problem there.  But the remainder 
of the log files never get touched.  No matter what happens, every file 
in the log folder other than james-server.log is empty.  I've tried 
changing log4j.properties and setting everything to DEBUG level.  The 
console log dumps a bunch more info while in DEBUG mode (which confirms 
I'm changing the correct log4j file).  But every other log file is still 
empty.  I used to see my mailet output in the main console and 
james-server.log in b5.  I'm not seeing any of that anywhere. Again, 
I've played around with log4j.properties (I made sure I was using the 
latest 3.3.0 log4j.properties file).  Nothing.  What am I doing wrong?  
How can I get log data to start going into those other files?


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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
Thank you so much.  This new log4j.properties file did solve the problem 
that the logs were not getting written.   When I finally saw the mailet 
log, I realized that this wasn't the real problem. Even though there was 
some mailet logging data now written to the log file, my own mailet 
log(..) output was still missing.  But the good news is that I figured 
out what was happening.  I decided to start researching up the mailet 
class hierarchy.   I found the log(..) methods in GenericMailet.   Both 
variations of log(...) were flagged as "@deprecated Prefer using SLF4J 
LoggingFactory to get a Logger in each class"  (actually it should say 
LoggerFactory, not LoggingFactory... but that's not a big deal). So I 
cloned the SLF4J code from GenericMailet to one my mailets, and viola... 
I got my mailet log output.  Not sure why the GenericMailet logger was 
eating all of the output.  I tried adding a line to log4j: 
log4j.logger.org.apache.james.mailet.base=DEBUG, MAILETCONTAINER.  But 
that didn't seem to make a difference.

But the GenericMailet's log(..) problem is not critical to me anymore 
assuming that the SLF4J updates to all of my mailets work as the test did.

Thanks.

Jerry

On 9/26/2019 2:53 AM, Tellier Benoit wrote:
> Check https://github.com/linagora/james-project/pull/2718
>
> This should solve your issue.
>
> On 20/09/2019 09:18, Jerry Malcolm wrote:
>> Any chance I could get someone to take a look at this problem? There's
>> no way for me to move forward until I can see my mailet logs.  I tried
>> to dig into slf4j and log4j.  But I just don't have enough background in
>> that to figure out what is happening.  And since I don't have a full
>> james set up on an IDE where I can set breakpoints, I have no way to
>> figure out why all log data is just being discarded regardless of the
>> log4j.properties settings.  With the appropriate tools it seems like
>> it'd be pretty easy to see why log4j is not writing any data.  But I
>> just don't have the tools. Can somebody in James development please take
>> a few minutes and see if they figure it out?  I'm sure it's probably
>> something trivial as properties file settings.  But without some
>> guidance, I'm shooting in the dark.
>>
>> Help, please?
>>
>> Jerry
>>
>> On 9/18/2019 10:18 AM, Jerry Malcolm wrote:
>>> Without a way to see my mailet log data, I have no way of knowing if
>>> my mailets were even called, if they succeeded, if they failed. Right
>>> now, all I know is they went into a processor and disappeared.  This
>>> is a serious problem for me.  I really need to have a way to see this
>>> data.  If it's a log4j.properties change, I just need to know what to
>>> change.  I'm dead in the water.
>>>
>>>
>>> On 9/17/2019 11:08 PM, Jerry Malcolm wrote:
>>>> I added the transport line as you suggested and sent a test email
>>>> inbound.  The console showed it coming in, as does james-server.log.
>>>> But still, the only log file in the logs directory that is not empty
>>>> is james-server. Nothing is going to any of these files.
>>>>
>>>> On 9/17/2019 10:49 PM, Tellier Benoit wrote:
>>>>> I inlined my answers...
>>>>>
>>>>> Regards,
>>>>>
>>>>> On 18/09/2019 10:32, Jerry Malcolm wrote:
>>>>>> Thanks for the reply.  But I did not use my old log4j.properties.  I
>>>>>> copied the one from the downloaded 3.3.0 zip file. Although, it looks
>>>>>> almost identical to the beta5 one.  Any chance the wrong one is
>>>>>> included
>>>>>> in the package?
>>>>> I think the default log4j file was never updated.
>>>>>
>>>>> Contribution welcomed BTW...
>>>>>
>>>>>> I'm fine with logger-per-mailet. However, I'm hoping there's a way to
>>>>>> see the flow for an email item.  It's just as important at times to
>>>>>> see
>>>>>> that various matchers passed or didn't pass on an item as it goes
>>>>>> through the flow.  Is there still a logger that shows the flow?
>>>>> The approach regarding this is to use the MDC for doing some
>>>>> contextualized logging (SLF4J API)
>>>>>
>>>>> Within James guice application, we rely on logback, and a
>>>>> "ElasticSearch" appender. Logs can then be filtered by 'mail' property.
>>>>>
>>>>> You will then see all of the logs related to the processing of that
>>>>> very
>>>>> email.
>>>>>
>>>>> I'm not a log4j expert but there should be a way of doing something
>>>>> somehow similar...
>>>>>
>>>>>> Bottom line, though, I don't know what to put in the log4j file to
>>>>>> make
>>>>>> the mailet logs show up.  Do you have a link handy to the correct
>>>>>> log4j
>>>>>> in github?
>>>>> I don't think we have...
>>>>>
>>>>> I'm not an expert here but let's play a bit:
>>>>>
>>>>> In log4j.properties I would replace line 124
>>>>>
>>>>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>>>>
>>>>> By
>>>>>
>>>>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>>>> log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
>>>>>
>>>>> (Rationals: all mailets are located within the
>>>>> "org.apache.james.transport.mailets" &
>>>>> "org.apache.james.transport.matchers" packages...
>>>>>
>>>>>> Thx
>>>>>>
>>>>>>
>>>>>> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>>>>>>> Maybe I could help on that one:
>>>>>>>
>>>>>>> The mailet logging had been migrated to a standard SLF4J approach.
>>>>>>>
>>>>>>> Before that, all mailet logs went though a single logger, exposed as
>>>>>>> part of the MailetContext object.
>>>>>>>
>>>>>>> Before 3.0.0 release we altered that behavior, and create one
>>>>>>> logger per
>>>>>>> mailet class for bundled mailets.
>>>>>>>
>>>>>>> In the end, this enabled simpler logging filtering - on a per mailet
>>>>>>> basis, got rid of the imperfect logging facade exposed in the
>>>>>>> mailet API
>>>>>>> (no placeholder for instance), and also killed some "debug"
>>>>>>> configuration parameters.
>>>>>>>
>>>>>>> I believe that your log4j configuration file inherited from beta5
>>>>>>> needs
>>>>>>> to be revisited to adapt these changes.
>>>>>>>
>>>>>>> Hope it helps.
>>>>>>>
>>>>>>> Benoit
>>>>>>>
>>>>>>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>>>>>>> Not good news for me, however.  My mailet flow that worked in
>>>>>>>> v3b5 is
>>>>>>>> crashing now, and none of the log output I'm writing from my
>>>>>>>> mailets is
>>>>>>>> showing up anywhere.  I've GOT to see that log info some place in
>>>>>>>> order
>>>>>>>> to debug both my mailets as well as my mailet flow that is
>>>>>>>> somehow no
>>>>>>>> longer compatible.  All I get is a 'mail received' message, and
>>>>>>>> an error
>>>>>>>> saying it can't launch one of my mailets because there is a
>>>>>>>> recursive
>>>>>>>> loop in my flow (there is not, or at least there was not when it
>>>>>>>> running
>>>>>>>> in v3b5).
>>>>>>>>
>>>>>>>> There's got to be a way to see mailet log data. Tellier?
>>>>>>>>
>>>>>>>>
>>>>>>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>>>>>>> It’s not you. I have the same issue. I think those other log
>>>>>>>>> files are
>>>>>>>>> just there for backwards compatibility to make users feel good,
>>>>>>>>> since
>>>>>>>>> they never seem to be written to. “No news is good news” as the
>>>>>>>>> saying
>>>>>>>>> goes.
>>>>>>>>>
>>>>>>>>> Sent from my iPhone
>>>>>>>>>
>>>>>>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm
>>>>>>>>>> <te...@malcolms.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> For the problem du jour.... when I start JAMES, all of the
>>>>>>>>>> expected
>>>>>>>>>> log files get created.  The main log output  goes to the
>>>>>>>>>> console and
>>>>>>>>>> to the james-server.log file as expected.  No problem there.
>>>>>>>>>> But the
>>>>>>>>>> remainder of the log files never get touched.  No matter what
>>>>>>>>>> happens, every file in the log folder other than
>>>>>>>>>> james-server.log is
>>>>>>>>>> empty.  I've tried changing log4j.properties and setting
>>>>>>>>>> everything
>>>>>>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>>>>>>> DEBUG mode (which confirms I'm changing the correct log4j
>>>>>>>>>> file).  But
>>>>>>>>>> every other log file is still empty.  I used to see my mailet
>>>>>>>>>> output
>>>>>>>>>> in the main console and james-server.log in b5.  I'm not seeing
>>>>>>>>>> any
>>>>>>>>>> of that anywhere. Again, I've played around with
>>>>>>>>>> log4j.properties (I
>>>>>>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>>>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>>>>>>> going into those other files?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Tellier Benoit <bt...@apache.org>.
Check https://github.com/linagora/james-project/pull/2718

This should solve your issue.

On 20/09/2019 09:18, Jerry Malcolm wrote:
> Any chance I could get someone to take a look at this problem? There's
> no way for me to move forward until I can see my mailet logs.  I tried
> to dig into slf4j and log4j.  But I just don't have enough background in
> that to figure out what is happening.  And since I don't have a full
> james set up on an IDE where I can set breakpoints, I have no way to
> figure out why all log data is just being discarded regardless of the
> log4j.properties settings.  With the appropriate tools it seems like
> it'd be pretty easy to see why log4j is not writing any data.  But I
> just don't have the tools. Can somebody in James development please take
> a few minutes and see if they figure it out?  I'm sure it's probably
> something trivial as properties file settings.  But without some
> guidance, I'm shooting in the dark.
> 
> Help, please?
> 
> Jerry
> 
> On 9/18/2019 10:18 AM, Jerry Malcolm wrote:
>> Without a way to see my mailet log data, I have no way of knowing if
>> my mailets were even called, if they succeeded, if they failed. Right
>> now, all I know is they went into a processor and disappeared.  This
>> is a serious problem for me.  I really need to have a way to see this
>> data.  If it's a log4j.properties change, I just need to know what to
>> change.  I'm dead in the water.
>>
>>
>> On 9/17/2019 11:08 PM, Jerry Malcolm wrote:
>>> I added the transport line as you suggested and sent a test email
>>> inbound.  The console showed it coming in, as does james-server.log. 
>>> But still, the only log file in the logs directory that is not empty
>>> is james-server. Nothing is going to any of these files.
>>>
>>> On 9/17/2019 10:49 PM, Tellier Benoit wrote:
>>>> I inlined my answers...
>>>>
>>>> Regards,
>>>>
>>>> On 18/09/2019 10:32, Jerry Malcolm wrote:
>>>>> Thanks for the reply.  But I did not use my old log4j.properties.  I
>>>>> copied the one from the downloaded 3.3.0 zip file. Although, it looks
>>>>> almost identical to the beta5 one.  Any chance the wrong one is
>>>>> included
>>>>> in the package?
>>>> I think the default log4j file was never updated.
>>>>
>>>> Contribution welcomed BTW...
>>>>
>>>>> I'm fine with logger-per-mailet. However, I'm hoping there's a way to
>>>>> see the flow for an email item.  It's just as important at times to
>>>>> see
>>>>> that various matchers passed or didn't pass on an item as it goes
>>>>> through the flow.  Is there still a logger that shows the flow?
>>>> The approach regarding this is to use the MDC for doing some
>>>> contextualized logging (SLF4J API)
>>>>
>>>> Within James guice application, we rely on logback, and a
>>>> "ElasticSearch" appender. Logs can then be filtered by 'mail' property.
>>>>
>>>> You will then see all of the logs related to the processing of that
>>>> very
>>>> email.
>>>>
>>>> I'm not a log4j expert but there should be a way of doing something
>>>> somehow similar...
>>>>
>>>>> Bottom line, though, I don't know what to put in the log4j file to
>>>>> make
>>>>> the mailet logs show up.  Do you have a link handy to the correct
>>>>> log4j
>>>>> in github?
>>>> I don't think we have...
>>>>
>>>> I'm not an expert here but let's play a bit:
>>>>
>>>> In log4j.properties I would replace line 124
>>>>
>>>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>>>
>>>> By
>>>>
>>>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>>> log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
>>>>
>>>> (Rationals: all mailets are located within the
>>>> "org.apache.james.transport.mailets" &
>>>> "org.apache.james.transport.matchers" packages...
>>>>
>>>>> Thx
>>>>>
>>>>>
>>>>> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>>>>>> Maybe I could help on that one:
>>>>>>
>>>>>> The mailet logging had been migrated to a standard SLF4J approach.
>>>>>>
>>>>>> Before that, all mailet logs went though a single logger, exposed as
>>>>>> part of the MailetContext object.
>>>>>>
>>>>>> Before 3.0.0 release we altered that behavior, and create one
>>>>>> logger per
>>>>>> mailet class for bundled mailets.
>>>>>>
>>>>>> In the end, this enabled simpler logging filtering - on a per mailet
>>>>>> basis, got rid of the imperfect logging facade exposed in the
>>>>>> mailet API
>>>>>> (no placeholder for instance), and also killed some "debug"
>>>>>> configuration parameters.
>>>>>>
>>>>>> I believe that your log4j configuration file inherited from beta5
>>>>>> needs
>>>>>> to be revisited to adapt these changes.
>>>>>>
>>>>>> Hope it helps.
>>>>>>
>>>>>> Benoit
>>>>>>
>>>>>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>>>>>> Not good news for me, however.  My mailet flow that worked in
>>>>>>> v3b5 is
>>>>>>> crashing now, and none of the log output I'm writing from my
>>>>>>> mailets is
>>>>>>> showing up anywhere.  I've GOT to see that log info some place in
>>>>>>> order
>>>>>>> to debug both my mailets as well as my mailet flow that is
>>>>>>> somehow no
>>>>>>> longer compatible.  All I get is a 'mail received' message, and
>>>>>>> an error
>>>>>>> saying it can't launch one of my mailets because there is a
>>>>>>> recursive
>>>>>>> loop in my flow (there is not, or at least there was not when it
>>>>>>> running
>>>>>>> in v3b5).
>>>>>>>
>>>>>>> There's got to be a way to see mailet log data. Tellier?
>>>>>>>
>>>>>>>
>>>>>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>>>>>> It’s not you. I have the same issue. I think those other log
>>>>>>>> files are
>>>>>>>> just there for backwards compatibility to make users feel good,
>>>>>>>> since
>>>>>>>> they never seem to be written to. “No news is good news” as the
>>>>>>>> saying
>>>>>>>> goes.
>>>>>>>>
>>>>>>>> Sent from my iPhone
>>>>>>>>
>>>>>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm
>>>>>>>>> <te...@malcolms.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> For the problem du jour.... when I start JAMES, all of the
>>>>>>>>> expected
>>>>>>>>> log files get created.  The main log output  goes to the
>>>>>>>>> console and
>>>>>>>>> to the james-server.log file as expected.  No problem there. 
>>>>>>>>> But the
>>>>>>>>> remainder of the log files never get touched.  No matter what
>>>>>>>>> happens, every file in the log folder other than
>>>>>>>>> james-server.log is
>>>>>>>>> empty.  I've tried changing log4j.properties and setting
>>>>>>>>> everything
>>>>>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>>>>>> DEBUG mode (which confirms I'm changing the correct log4j
>>>>>>>>> file).  But
>>>>>>>>> every other log file is still empty.  I used to see my mailet
>>>>>>>>> output
>>>>>>>>> in the main console and james-server.log in b5.  I'm not seeing
>>>>>>>>> any
>>>>>>>>> of that anywhere. Again, I've played around with
>>>>>>>>> log4j.properties (I
>>>>>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>>>>>> going into those other files?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>>
>>>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>>
>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 

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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
Any chance I could get someone to take a look at this problem? There's 
no way for me to move forward until I can see my mailet logs.  I tried 
to dig into slf4j and log4j.  But I just don't have enough background in 
that to figure out what is happening.  And since I don't have a full 
james set up on an IDE where I can set breakpoints, I have no way to 
figure out why all log data is just being discarded regardless of the 
log4j.properties settings.  With the appropriate tools it seems like 
it'd be pretty easy to see why log4j is not writing any data.  But I 
just don't have the tools. Can somebody in James development please take 
a few minutes and see if they figure it out?  I'm sure it's probably 
something trivial as properties file settings.  But without some 
guidance, I'm shooting in the dark.

Help, please?

Jerry

On 9/18/2019 10:18 AM, Jerry Malcolm wrote:
> Without a way to see my mailet log data, I have no way of knowing if 
> my mailets were even called, if they succeeded, if they failed. Right 
> now, all I know is they went into a processor and disappeared.  This 
> is a serious problem for me.  I really need to have a way to see this 
> data.  If it's a log4j.properties change, I just need to know what to 
> change.  I'm dead in the water.
>
>
> On 9/17/2019 11:08 PM, Jerry Malcolm wrote:
>> I added the transport line as you suggested and sent a test email 
>> inbound.  The console showed it coming in, as does james-server.log.  
>> But still, the only log file in the logs directory that is not empty 
>> is james-server. Nothing is going to any of these files.
>>
>> On 9/17/2019 10:49 PM, Tellier Benoit wrote:
>>> I inlined my answers...
>>>
>>> Regards,
>>>
>>> On 18/09/2019 10:32, Jerry Malcolm wrote:
>>>> Thanks for the reply.  But I did not use my old log4j.properties.  I
>>>> copied the one from the downloaded 3.3.0 zip file. Although, it looks
>>>> almost identical to the beta5 one.  Any chance the wrong one is 
>>>> included
>>>> in the package?
>>> I think the default log4j file was never updated.
>>>
>>> Contribution welcomed BTW...
>>>
>>>> I'm fine with logger-per-mailet. However, I'm hoping there's a way to
>>>> see the flow for an email item.  It's just as important at times to 
>>>> see
>>>> that various matchers passed or didn't pass on an item as it goes
>>>> through the flow.  Is there still a logger that shows the flow?
>>> The approach regarding this is to use the MDC for doing some
>>> contextualized logging (SLF4J API)
>>>
>>> Within James guice application, we rely on logback, and a
>>> "ElasticSearch" appender. Logs can then be filtered by 'mail' property.
>>>
>>> You will then see all of the logs related to the processing of that 
>>> very
>>> email.
>>>
>>> I'm not a log4j expert but there should be a way of doing something
>>> somehow similar...
>>>
>>>> Bottom line, though, I don't know what to put in the log4j file to 
>>>> make
>>>> the mailet logs show up.  Do you have a link handy to the correct 
>>>> log4j
>>>> in github?
>>> I don't think we have...
>>>
>>> I'm not an expert here but let's play a bit:
>>>
>>> In log4j.properties I would replace line 124
>>>
>>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>>
>>> By
>>>
>>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>> log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
>>>
>>> (Rationals: all mailets are located within the
>>> "org.apache.james.transport.mailets" &
>>> "org.apache.james.transport.matchers" packages...
>>>
>>>> Thx
>>>>
>>>>
>>>> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>>>>> Maybe I could help on that one:
>>>>>
>>>>> The mailet logging had been migrated to a standard SLF4J approach.
>>>>>
>>>>> Before that, all mailet logs went though a single logger, exposed as
>>>>> part of the MailetContext object.
>>>>>
>>>>> Before 3.0.0 release we altered that behavior, and create one 
>>>>> logger per
>>>>> mailet class for bundled mailets.
>>>>>
>>>>> In the end, this enabled simpler logging filtering - on a per mailet
>>>>> basis, got rid of the imperfect logging facade exposed in the 
>>>>> mailet API
>>>>> (no placeholder for instance), and also killed some "debug"
>>>>> configuration parameters.
>>>>>
>>>>> I believe that your log4j configuration file inherited from beta5 
>>>>> needs
>>>>> to be revisited to adapt these changes.
>>>>>
>>>>> Hope it helps.
>>>>>
>>>>> Benoit
>>>>>
>>>>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>>>>> Not good news for me, however.  My mailet flow that worked in 
>>>>>> v3b5 is
>>>>>> crashing now, and none of the log output I'm writing from my 
>>>>>> mailets is
>>>>>> showing up anywhere.  I've GOT to see that log info some place in 
>>>>>> order
>>>>>> to debug both my mailets as well as my mailet flow that is 
>>>>>> somehow no
>>>>>> longer compatible.  All I get is a 'mail received' message, and 
>>>>>> an error
>>>>>> saying it can't launch one of my mailets because there is a 
>>>>>> recursive
>>>>>> loop in my flow (there is not, or at least there was not when it 
>>>>>> running
>>>>>> in v3b5).
>>>>>>
>>>>>> There's got to be a way to see mailet log data. Tellier?
>>>>>>
>>>>>>
>>>>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>>>>> It’s not you. I have the same issue. I think those other log 
>>>>>>> files are
>>>>>>> just there for backwards compatibility to make users feel good, 
>>>>>>> since
>>>>>>> they never seem to be written to. “No news is good news” as the 
>>>>>>> saying
>>>>>>> goes.
>>>>>>>
>>>>>>> Sent from my iPhone
>>>>>>>
>>>>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm 
>>>>>>>> <te...@malcolms.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> For the problem du jour.... when I start JAMES, all of the 
>>>>>>>> expected
>>>>>>>> log files get created.  The main log output  goes to the 
>>>>>>>> console and
>>>>>>>> to the james-server.log file as expected.  No problem there.  
>>>>>>>> But the
>>>>>>>> remainder of the log files never get touched.  No matter what
>>>>>>>> happens, every file in the log folder other than 
>>>>>>>> james-server.log is
>>>>>>>> empty.  I've tried changing log4j.properties and setting 
>>>>>>>> everything
>>>>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>>>>> DEBUG mode (which confirms I'm changing the correct log4j 
>>>>>>>> file).  But
>>>>>>>> every other log file is still empty.  I used to see my mailet 
>>>>>>>> output
>>>>>>>> in the main console and james-server.log in b5.  I'm not seeing 
>>>>>>>> any
>>>>>>>> of that anywhere. Again, I've played around with 
>>>>>>>> log4j.properties (I
>>>>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>>>>> going into those other files?
>>>>>>>>
>>>>>>>>
>>>>>>>> --------------------------------------------------------------------- 
>>>>>>>>
>>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>>
>>>>>>> --------------------------------------------------------------------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
Without a way to see my mailet log data, I have no way of knowing if my 
mailets were even called, if they succeeded, if they failed.  Right now, 
all I know is they went into a processor and disappeared.  This is a 
serious problem for me.  I really need to have a way to see this data.  
If it's a log4j.properties change, I just need to know what to change.  
I'm dead in the water.


On 9/17/2019 11:08 PM, Jerry Malcolm wrote:
> I added the transport line as you suggested and sent a test email 
> inbound.  The console showed it coming in, as does james-server.log.  
> But still, the only log file in the logs directory that is not empty 
> is james-server.  Nothing is going to any of these files.
>
> On 9/17/2019 10:49 PM, Tellier Benoit wrote:
>> I inlined my answers...
>>
>> Regards,
>>
>> On 18/09/2019 10:32, Jerry Malcolm wrote:
>>> Thanks for the reply.  But I did not use my old log4j.properties.  I
>>> copied the one from the downloaded 3.3.0 zip file.  Although, it looks
>>> almost identical to the beta5 one.  Any chance the wrong one is 
>>> included
>>> in the package?
>> I think the default log4j file was never updated.
>>
>> Contribution welcomed BTW...
>>
>>> I'm fine with logger-per-mailet. However, I'm hoping there's a way to
>>> see the flow for an email item.  It's just as important at times to see
>>> that various matchers passed or didn't pass on an item as it goes
>>> through the flow.  Is there still a logger that shows the flow?
>> The approach regarding this is to use the MDC for doing some
>> contextualized logging (SLF4J API)
>>
>> Within James guice application, we rely on logback, and a
>> "ElasticSearch" appender. Logs can then be filtered by 'mail' property.
>>
>> You will then see all of the logs related to the processing of that very
>> email.
>>
>> I'm not a log4j expert but there should be a way of doing something
>> somehow similar...
>>
>>> Bottom line, though, I don't know what to put in the log4j file to make
>>> the mailet logs show up.  Do you have a link handy to the correct log4j
>>> in github?
>> I don't think we have...
>>
>> I'm not an expert here but let's play a bit:
>>
>> In log4j.properties I would replace line 124
>>
>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>>
>> By
>>
>> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>> log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
>>
>> (Rationals: all mailets are located within the
>> "org.apache.james.transport.mailets" &
>> "org.apache.james.transport.matchers" packages...
>>
>>> Thx
>>>
>>>
>>> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>>>> Maybe I could help on that one:
>>>>
>>>> The mailet logging had been migrated to a standard SLF4J approach.
>>>>
>>>> Before that, all mailet logs went though a single logger, exposed as
>>>> part of the MailetContext object.
>>>>
>>>> Before 3.0.0 release we altered that behavior, and create one 
>>>> logger per
>>>> mailet class for bundled mailets.
>>>>
>>>> In the end, this enabled simpler logging filtering - on a per mailet
>>>> basis, got rid of the imperfect logging facade exposed in the 
>>>> mailet API
>>>> (no placeholder for instance), and also killed some "debug"
>>>> configuration parameters.
>>>>
>>>> I believe that your log4j configuration file inherited from beta5 
>>>> needs
>>>> to be revisited to adapt these changes.
>>>>
>>>> Hope it helps.
>>>>
>>>> Benoit
>>>>
>>>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>>>> Not good news for me, however.  My mailet flow that worked in v3b5 is
>>>>> crashing now, and none of the log output I'm writing from my 
>>>>> mailets is
>>>>> showing up anywhere.  I've GOT to see that log info some place in 
>>>>> order
>>>>> to debug both my mailets as well as my mailet flow that is somehow no
>>>>> longer compatible.  All I get is a 'mail received' message, and an 
>>>>> error
>>>>> saying it can't launch one of my mailets because there is a recursive
>>>>> loop in my flow (there is not, or at least there was not when it 
>>>>> running
>>>>> in v3b5).
>>>>>
>>>>> There's got to be a way to see mailet log data.  Tellier?
>>>>>
>>>>>
>>>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>>>> It’s not you. I have the same issue. I think those other log 
>>>>>> files are
>>>>>> just there for backwards compatibility to make users feel good, 
>>>>>> since
>>>>>> they never seem to be written to. “No news is good news” as the 
>>>>>> saying
>>>>>> goes.
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> For the problem du jour.... when I start JAMES, all of the expected
>>>>>>> log files get created.  The main log output  goes to the console 
>>>>>>> and
>>>>>>> to the james-server.log file as expected.  No problem there.  
>>>>>>> But the
>>>>>>> remainder of the log files never get touched.  No matter what
>>>>>>> happens, every file in the log folder other than 
>>>>>>> james-server.log is
>>>>>>> empty.  I've tried changing log4j.properties and setting everything
>>>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>>>> DEBUG mode (which confirms I'm changing the correct log4j 
>>>>>>> file).  But
>>>>>>> every other log file is still empty.  I used to see my mailet 
>>>>>>> output
>>>>>>> in the main console and james-server.log in b5.  I'm not seeing any
>>>>>>> of that anywhere. Again, I've played around with 
>>>>>>> log4j.properties (I
>>>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>>>> going into those other files?
>>>>>>>
>>>>>>>
>>>>>>> --------------------------------------------------------------------- 
>>>>>>>
>>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>>
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
I added the transport line as you suggested and sent a test email 
inbound.  The console showed it coming in, as does james-server.log.  
But still, the only log file in the logs directory that is not empty is 
james-server.  Nothing is going to any of these files.

On 9/17/2019 10:49 PM, Tellier Benoit wrote:
> I inlined my answers...
>
> Regards,
>
> On 18/09/2019 10:32, Jerry Malcolm wrote:
>> Thanks for the reply.  But I did not use my old log4j.properties.  I
>> copied the one from the downloaded 3.3.0 zip file.  Although, it looks
>> almost identical to the beta5 one.  Any chance the wrong one is included
>> in the package?
> I think the default log4j file was never updated.
>
> Contribution welcomed BTW...
>
>> I'm fine with logger-per-mailet.  However, I'm hoping there's a way to
>> see the flow for an email item.  It's just as important at times to see
>> that various matchers passed or didn't pass on an item as it goes
>> through the flow.  Is there still a logger that shows the flow?
> The approach regarding this is to use the MDC for doing some
> contextualized logging (SLF4J API)
>
> Within James guice application, we rely on logback, and a
> "ElasticSearch" appender. Logs can then be filtered by 'mail' property.
>
> You will then see all of the logs related to the processing of that very
> email.
>
> I'm not a log4j expert but there should be a way of doing something
> somehow similar...
>
>> Bottom line, though, I don't know what to put in the log4j file to make
>> the mailet logs show up.  Do you have a link handy to the correct log4j
>> in github?
> I don't think we have...
>
> I'm not an expert here but let's play a bit:
>
> In log4j.properties I would replace line 124
>
> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>
> By
>
> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
> log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
>
> (Rationals: all mailets are located within the
> "org.apache.james.transport.mailets" &
> "org.apache.james.transport.matchers" packages...
>
>> Thx
>>
>>
>> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>>> Maybe I could help on that one:
>>>
>>> The mailet logging had been migrated to a standard SLF4J approach.
>>>
>>> Before that, all mailet logs went though a single logger, exposed as
>>> part of the MailetContext object.
>>>
>>> Before 3.0.0 release we altered that behavior, and create one logger per
>>> mailet class for bundled mailets.
>>>
>>> In the end, this enabled simpler logging filtering - on a per mailet
>>> basis, got rid of the imperfect logging facade exposed in the mailet API
>>> (no placeholder for instance), and also killed some "debug"
>>> configuration parameters.
>>>
>>> I believe that your log4j configuration file inherited from beta5 needs
>>> to be revisited to adapt these changes.
>>>
>>> Hope it helps.
>>>
>>> Benoit
>>>
>>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>>> Not good news for me, however.  My mailet flow that worked in v3b5 is
>>>> crashing now, and none of the log output I'm writing from my mailets is
>>>> showing up anywhere.  I've GOT to see that log info some place in order
>>>> to debug both my mailets as well as my mailet flow that is somehow no
>>>> longer compatible.  All I get is a 'mail received' message, and an error
>>>> saying it can't launch one of my mailets because there is a recursive
>>>> loop in my flow (there is not, or at least there was not when it running
>>>> in v3b5).
>>>>
>>>> There's got to be a way to see mailet log data.  Tellier?
>>>>
>>>>
>>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>>> It’s not you. I have the same issue. I think those other log files are
>>>>> just there for backwards compatibility to make users feel good, since
>>>>> they never seem to be written to. “No news is good news” as the saying
>>>>> goes.
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com>
>>>>>> wrote:
>>>>>>
>>>>>> For the problem du jour.... when I start JAMES, all of the expected
>>>>>> log files get created.  The main log output  goes to the console and
>>>>>> to the james-server.log file as expected.  No problem there.  But the
>>>>>> remainder of the log files never get touched.  No matter what
>>>>>> happens, every file in the log folder other than james-server.log is
>>>>>> empty.  I've tried changing log4j.properties and setting everything
>>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>>> DEBUG mode (which confirms I'm changing the correct log4j file).  But
>>>>>> every other log file is still empty.  I used to see my mailet output
>>>>>> in the main console and james-server.log in b5.  I'm not seeing any
>>>>>> of that anywhere. Again, I've played around with log4j.properties (I
>>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>>> going into those other files?
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
I'll try that shortly.  But that doesn't explain why all of the logger 
output files are empty, no matter what the log4j settings are.  This was 
after 30 minutes of running with every log level throughout 
log4j.properties set to DEBUG.  Shouldn't at least some of these have 
some sort of log data, such as imapserver.log, smtpserver.log, etc?

  9/17/2019  21:33               0  dnsservice.log
  9/17/2019  21:33               0  domainlist.log
  9/17/2019  21:33               0  fetchmail.log
  9/17/2019  21:33               0  imapserver.log
  9/17/2019  21:33               0  lmtpserver.log
  9/17/2019  21:33               0  mailboxmanager.log
  9/17/2019  21:33               0  mailetcontainer.log
  9/17/2019  21:33               0  mailqueuefactory.log
  9/17/2019  21:33               0  mailrepositorystore.log
  9/17/2019  21:33               0  pop3server.log
  9/17/2019  21:33               0  usersrepository.log
  9/17/2019  21:33               0  virtualusertable.log

On 9/17/2019 10:49 PM, Tellier Benoit wrote:
> I inlined my answers...
>
> Regards,
>
> On 18/09/2019 10:32, Jerry Malcolm wrote:
>> Thanks for the reply.  But I did not use my old log4j.properties.  I
>> copied the one from the downloaded 3.3.0 zip file.  Although, it looks
>> almost identical to the beta5 one.  Any chance the wrong one is included
>> in the package?
> I think the default log4j file was never updated.
>
> Contribution welcomed BTW...
>
>> I'm fine with logger-per-mailet.  However, I'm hoping there's a way to
>> see the flow for an email item.  It's just as important at times to see
>> that various matchers passed or didn't pass on an item as it goes
>> through the flow.  Is there still a logger that shows the flow?
> The approach regarding this is to use the MDC for doing some
> contextualized logging (SLF4J API)
>
> Within James guice application, we rely on logback, and a
> "ElasticSearch" appender. Logs can then be filtered by 'mail' property.
>
> You will then see all of the logs related to the processing of that very
> email.
>
> I'm not a log4j expert but there should be a way of doing something
> somehow similar...
>
>> Bottom line, though, I don't know what to put in the log4j file to make
>> the mailet logs show up.  Do you have a link handy to the correct log4j
>> in github?
> I don't think we have...
>
> I'm not an expert here but let's play a bit:
>
> In log4j.properties I would replace line 124
>
> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
>
> By
>
> log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
> log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER
>
> (Rationals: all mailets are located within the
> "org.apache.james.transport.mailets" &
> "org.apache.james.transport.matchers" packages...
>
>> Thx
>>
>>
>> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>>> Maybe I could help on that one:
>>>
>>> The mailet logging had been migrated to a standard SLF4J approach.
>>>
>>> Before that, all mailet logs went though a single logger, exposed as
>>> part of the MailetContext object.
>>>
>>> Before 3.0.0 release we altered that behavior, and create one logger per
>>> mailet class for bundled mailets.
>>>
>>> In the end, this enabled simpler logging filtering - on a per mailet
>>> basis, got rid of the imperfect logging facade exposed in the mailet API
>>> (no placeholder for instance), and also killed some "debug"
>>> configuration parameters.
>>>
>>> I believe that your log4j configuration file inherited from beta5 needs
>>> to be revisited to adapt these changes.
>>>
>>> Hope it helps.
>>>
>>> Benoit
>>>
>>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>>> Not good news for me, however.  My mailet flow that worked in v3b5 is
>>>> crashing now, and none of the log output I'm writing from my mailets is
>>>> showing up anywhere.  I've GOT to see that log info some place in order
>>>> to debug both my mailets as well as my mailet flow that is somehow no
>>>> longer compatible.  All I get is a 'mail received' message, and an error
>>>> saying it can't launch one of my mailets because there is a recursive
>>>> loop in my flow (there is not, or at least there was not when it running
>>>> in v3b5).
>>>>
>>>> There's got to be a way to see mailet log data.  Tellier?
>>>>
>>>>
>>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>>> It’s not you. I have the same issue. I think those other log files are
>>>>> just there for backwards compatibility to make users feel good, since
>>>>> they never seem to be written to. “No news is good news” as the saying
>>>>> goes.
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com>
>>>>>> wrote:
>>>>>>
>>>>>> For the problem du jour.... when I start JAMES, all of the expected
>>>>>> log files get created.  The main log output  goes to the console and
>>>>>> to the james-server.log file as expected.  No problem there.  But the
>>>>>> remainder of the log files never get touched.  No matter what
>>>>>> happens, every file in the log folder other than james-server.log is
>>>>>> empty.  I've tried changing log4j.properties and setting everything
>>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>>> DEBUG mode (which confirms I'm changing the correct log4j file).  But
>>>>>> every other log file is still empty.  I used to see my mailet output
>>>>>> in the main console and james-server.log in b5.  I'm not seeing any
>>>>>> of that anywhere. Again, I've played around with log4j.properties (I
>>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>>> going into those other files?
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Tellier Benoit <bt...@apache.org>.
I inlined my answers...

Regards,

On 18/09/2019 10:32, Jerry Malcolm wrote:
> Thanks for the reply.  But I did not use my old log4j.properties.  I
> copied the one from the downloaded 3.3.0 zip file.  Although, it looks
> almost identical to the beta5 one.  Any chance the wrong one is included
> in the package?

I think the default log4j file was never updated.

Contribution welcomed BTW...

> I'm fine with logger-per-mailet.  However, I'm hoping there's a way to
> see the flow for an email item.  It's just as important at times to see
> that various matchers passed or didn't pass on an item as it goes
> through the flow.  Is there still a logger that shows the flow?

The approach regarding this is to use the MDC for doing some
contextualized logging (SLF4J API)

Within James guice application, we rely on logback, and a
"ElasticSearch" appender. Logs can then be filtered by 'mail' property.

You will then see all of the logs related to the processing of that very
email.

I'm not a log4j expert but there should be a way of doing something
somehow similar...

> Bottom line, though, I don't know what to put in the log4j file to make
> the mailet logs show up.  Do you have a link handy to the correct log4j
> in github?

I don't think we have...

I'm not an expert here but let's play a bit:

In log4j.properties I would replace line 124

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER

By

log4j.logger.org.apache.james.mailprocessor=INFO, MAILETCONTAINER
log4j.logger.org.apache.james.transport=INFO, MAILETCONTAINER

(Rationals: all mailets are located within the
"org.apache.james.transport.mailets" &
"org.apache.james.transport.matchers" packages...

> Thx
> 
> 
> On 9/17/2019 10:23 PM, Tellier Benoit wrote:
>> Maybe I could help on that one:
>>
>> The mailet logging had been migrated to a standard SLF4J approach.
>>
>> Before that, all mailet logs went though a single logger, exposed as
>> part of the MailetContext object.
>>
>> Before 3.0.0 release we altered that behavior, and create one logger per
>> mailet class for bundled mailets.
>>
>> In the end, this enabled simpler logging filtering - on a per mailet
>> basis, got rid of the imperfect logging facade exposed in the mailet API
>> (no placeholder for instance), and also killed some "debug"
>> configuration parameters.
>>
>> I believe that your log4j configuration file inherited from beta5 needs
>> to be revisited to adapt these changes.
>>
>> Hope it helps.
>>
>> Benoit
>>
>> On 18/09/2019 09:10, Jerry Malcolm wrote:
>>> Not good news for me, however.  My mailet flow that worked in v3b5 is
>>> crashing now, and none of the log output I'm writing from my mailets is
>>> showing up anywhere.  I've GOT to see that log info some place in order
>>> to debug both my mailets as well as my mailet flow that is somehow no
>>> longer compatible.  All I get is a 'mail received' message, and an error
>>> saying it can't launch one of my mailets because there is a recursive
>>> loop in my flow (there is not, or at least there was not when it running
>>> in v3b5).
>>>
>>> There's got to be a way to see mailet log data.  Tellier?
>>>
>>>
>>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>>> It’s not you. I have the same issue. I think those other log files are
>>>> just there for backwards compatibility to make users feel good, since
>>>> they never seem to be written to. “No news is good news” as the saying
>>>> goes.
>>>>
>>>> Sent from my iPhone
>>>>
>>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com>
>>>>> wrote:
>>>>>
>>>>> For the problem du jour.... when I start JAMES, all of the expected
>>>>> log files get created.  The main log output  goes to the console and
>>>>> to the james-server.log file as expected.  No problem there.  But the
>>>>> remainder of the log files never get touched.  No matter what
>>>>> happens, every file in the log folder other than james-server.log is
>>>>> empty.  I've tried changing log4j.properties and setting everything
>>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>>> DEBUG mode (which confirms I'm changing the correct log4j file).  But
>>>>> every other log file is still empty.  I used to see my mailet output
>>>>> in the main console and james-server.log in b5.  I'm not seeing any
>>>>> of that anywhere. Again, I've played around with log4j.properties (I
>>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>>> going into those other files?
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 

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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
Thanks for the reply.  But I did not use my old log4j.properties.  I 
copied the one from the downloaded 3.3.0 zip file.  Although, it looks 
almost identical to the beta5 one.  Any chance the wrong one is included 
in the package?

I'm fine with logger-per-mailet.  However, I'm hoping there's a way to 
see the flow for an email item.  It's just as important at times to see 
that various matchers passed or didn't pass on an item as it goes 
through the flow.  Is there still a logger that shows the flow?

Bottom line, though, I don't know what to put in the log4j file to make 
the mailet logs show up.  Do you have a link handy to the correct log4j 
in github?

Thx


On 9/17/2019 10:23 PM, Tellier Benoit wrote:
> Maybe I could help on that one:
>
> The mailet logging had been migrated to a standard SLF4J approach.
>
> Before that, all mailet logs went though a single logger, exposed as
> part of the MailetContext object.
>
> Before 3.0.0 release we altered that behavior, and create one logger per
> mailet class for bundled mailets.
>
> In the end, this enabled simpler logging filtering - on a per mailet
> basis, got rid of the imperfect logging facade exposed in the mailet API
> (no placeholder for instance), and also killed some "debug"
> configuration parameters.
>
> I believe that your log4j configuration file inherited from beta5 needs
> to be revisited to adapt these changes.
>
> Hope it helps.
>
> Benoit
>
> On 18/09/2019 09:10, Jerry Malcolm wrote:
>> Not good news for me, however.  My mailet flow that worked in v3b5 is
>> crashing now, and none of the log output I'm writing from my mailets is
>> showing up anywhere.  I've GOT to see that log info some place in order
>> to debug both my mailets as well as my mailet flow that is somehow no
>> longer compatible.  All I get is a 'mail received' message, and an error
>> saying it can't launch one of my mailets because there is a recursive
>> loop in my flow (there is not, or at least there was not when it running
>> in v3b5).
>>
>> There's got to be a way to see mailet log data.  Tellier?
>>
>>
>> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>>> It’s not you. I have the same issue. I think those other log files are
>>> just there for backwards compatibility to make users feel good, since
>>> they never seem to be written to. “No news is good news” as the saying
>>> goes.
>>>
>>> Sent from my iPhone
>>>
>>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com>
>>>> wrote:
>>>>
>>>> For the problem du jour.... when I start JAMES, all of the expected
>>>> log files get created.  The main log output  goes to the console and
>>>> to the james-server.log file as expected.  No problem there.  But the
>>>> remainder of the log files never get touched.  No matter what
>>>> happens, every file in the log folder other than james-server.log is
>>>> empty.  I've tried changing log4j.properties and setting everything
>>>> to DEBUG level.  The console log dumps a bunch more info while in
>>>> DEBUG mode (which confirms I'm changing the correct log4j file).  But
>>>> every other log file is still empty.  I used to see my mailet output
>>>> in the main console and james-server.log in b5.  I'm not seeing any
>>>> of that anywhere. Again, I've played around with log4j.properties (I
>>>> made sure I was using the latest 3.3.0 log4j.properties file).
>>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>>> going into those other files?
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Tellier Benoit <bt...@apache.org>.
Maybe I could help on that one:

The mailet logging had been migrated to a standard SLF4J approach.

Before that, all mailet logs went though a single logger, exposed as
part of the MailetContext object.

Before 3.0.0 release we altered that behavior, and create one logger per
mailet class for bundled mailets.

In the end, this enabled simpler logging filtering - on a per mailet
basis, got rid of the imperfect logging facade exposed in the mailet API
(no placeholder for instance), and also killed some "debug"
configuration parameters.

I believe that your log4j configuration file inherited from beta5 needs
to be revisited to adapt these changes.

Hope it helps.

Benoit

On 18/09/2019 09:10, Jerry Malcolm wrote:
> Not good news for me, however.  My mailet flow that worked in v3b5 is
> crashing now, and none of the log output I'm writing from my mailets is
> showing up anywhere.  I've GOT to see that log info some place in order
> to debug both my mailets as well as my mailet flow that is somehow no
> longer compatible.  All I get is a 'mail received' message, and an error
> saying it can't launch one of my mailets because there is a recursive
> loop in my flow (there is not, or at least there was not when it running
> in v3b5).
> 
> There's got to be a way to see mailet log data.  Tellier?
> 
> 
> On 9/17/2019 9:02 PM, Garry Hurley wrote:
>> It’s not you. I have the same issue. I think those other log files are
>> just there for backwards compatibility to make users feel good, since
>> they never seem to be written to. “No news is good news” as the saying
>> goes.
>>
>> Sent from my iPhone
>>
>>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com>
>>> wrote:
>>>
>>> For the problem du jour.... when I start JAMES, all of the expected
>>> log files get created.  The main log output  goes to the console and
>>> to the james-server.log file as expected.  No problem there.  But the
>>> remainder of the log files never get touched.  No matter what
>>> happens, every file in the log folder other than james-server.log is
>>> empty.  I've tried changing log4j.properties and setting everything
>>> to DEBUG level.  The console log dumps a bunch more info while in
>>> DEBUG mode (which confirms I'm changing the correct log4j file).  But
>>> every other log file is still empty.  I used to see my mailet output
>>> in the main console and james-server.log in b5.  I'm not seeing any
>>> of that anywhere. Again, I've played around with log4j.properties (I
>>> made sure I was using the latest 3.3.0 log4j.properties file). 
>>> Nothing.  What am I doing wrong?  How can I get log data to start
>>> going into those other files?
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 

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


Re: log4j Configuration

Posted by Jerry Malcolm <te...@malcolms.com>.
Not good news for me, however.  My mailet flow that worked in v3b5 is 
crashing now, and none of the log output I'm writing from my mailets is 
showing up anywhere.  I've GOT to see that log info some place in order 
to debug both my mailets as well as my mailet flow that is somehow no 
longer compatible.  All I get is a 'mail received' message, and an error 
saying it can't launch one of my mailets because there is a recursive 
loop in my flow (there is not, or at least there was not when it running 
in v3b5).

There's got to be a way to see mailet log data.  Tellier?


On 9/17/2019 9:02 PM, Garry Hurley wrote:
> It’s not you. I have the same issue. I think those other log files are just there for backwards compatibility to make users feel good, since they never seem to be written to. “No news is good news” as the saying goes.
>
> Sent from my iPhone
>
>> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com> wrote:
>>
>> For the problem du jour.... when I start JAMES, all of the expected log files get created.  The main log output  goes to the console and to the james-server.log file as expected.  No problem there.  But the remainder of the log files never get touched.  No matter what happens, every file in the log folder other than james-server.log is empty.  I've tried changing log4j.properties and setting everything to DEBUG level.  The console log dumps a bunch more info while in DEBUG mode (which confirms I'm changing the correct log4j file).  But every other log file is still empty.  I used to see my mailet output in the main console and james-server.log in b5.  I'm not seeing any of that anywhere. Again, I've played around with log4j.properties (I made sure I was using the latest 3.3.0 log4j.properties file).  Nothing.  What am I doing wrong?  How can I get log data to start going into those other files?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: log4j Configuration

Posted by Garry Hurley <ga...@gmail.com>.
It’s not you. I have the same issue. I think those other log files are just there for backwards compatibility to make users feel good, since they never seem to be written to. “No news is good news” as the saying goes. 

Sent from my iPhone

> On Sep 17, 2019, at 4:34 PM, Jerry Malcolm <te...@malcolms.com> wrote:
> 
> For the problem du jour.... when I start JAMES, all of the expected log files get created.  The main log output  goes to the console and to the james-server.log file as expected.  No problem there.  But the remainder of the log files never get touched.  No matter what happens, every file in the log folder other than james-server.log is empty.  I've tried changing log4j.properties and setting everything to DEBUG level.  The console log dumps a bunch more info while in DEBUG mode (which confirms I'm changing the correct log4j file).  But every other log file is still empty.  I used to see my mailet output in the main console and james-server.log in b5.  I'm not seeing any of that anywhere. Again, I've played around with log4j.properties (I made sure I was using the latest 3.3.0 log4j.properties file).  Nothing.  What am I doing wrong?  How can I get log data to start going into those other files?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 

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