Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Re: Questions about Grouper logging

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Re: Questions about Grouper logging


Chronological Thread 
  • From: Baron Fujimoto <>
  • To: Chris Hyzer <>
  • Cc: Grouper Users <>
  • Subject: Re: [grouper-users] Re: Questions about Grouper logging
  • Date: Thu, 10 Sep 2015 11:08:17 -1000

Now that I understand what it's doing (I think), I can figure something out.
Perhaps this could be improved in the future though? Ideally, for the sake
of consistency, the components would use a log4j.properties file in their
respective conf directories. Right now, having to modify
webapp/appName/WEB-INF/classes/log4j.properties *after* the build for the
component is counter-intuitive for me. (If this is common in the Java world,
then chalk it up to my lack of experience.) In the interim, documenting this
in the Grouper wiki for reference may be helpful.

Aloha,
-baron

On Thu, Sep 10, 2015 at 02:15:06PM +0000, Chris Hyzer wrote:
>Yeah, it copies from there. You can add another step to your build process
>to copy from another location.
>There is nothing in standard grouper for this, but here is an ant script we
>use at Penn which might help you out :)
>
>https://spaces.internet2.edu/display/Grouper/Managing+Grouper+in+several+environments
>
>Thanks,
>Chris
>
>-----Original Message-----
>From: Baron Fujimoto
>[mailto:]
>
>Sent: Wednesday, September 09, 2015 8:52 PM
>To: Chris Hyzer
>Cc: Grouper Users
>Subject: Re: [grouper-users] Re: Questions about Grouper logging
>
>I tried this for each of the components, yet everything still wound up in
>grouper-api_*.log. A little more investigation yielded that when
>rebuilding the components with "ant dist", log4.properties is copied from
>the grouper-api conf dir.
>
>grouper-ui:
> [copy] Copying /home/grouper/grouper/grouper-api/conf/log4j.properties
> to
> /home/grouper/grouper/grouper.ui-2.2.1/dist/grouper/WEB-INF/classes/log4j.properties
>
>grouper-ws:
> [copy] Copying /home/grouper/grouper/grouper-api/conf/log4j.properties
> to
> /home/grouper/grouper/grouper.ws-2.2.1/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/log4j.properties
>
>So at least that explains why its all going to the same logfile. It doesn't
>seem to use webapp/appName/WEB-INF/classes/log4j.properties in the build (or
>it's overwritten if it does). Or am I building/deploying this wrong? I think
>what I'm doing is consistent with the general overlay process, no?
>
>-baron
>
>On Wed, Sep 09, 2015 at 09:49:35PM +0000, Chris Hyzer wrote:
>>Set absolute paths in the webapps/appName/WEB-INF/classes/log4j.properties
>>
>>When it starts up, you should see that the log4j is read from various
>>places in the STDOUT/STDERR (catalina.out).
>>
>>Ok?
>>
>>Thanks,
>>Chris
>>
>>-----Original Message-----
>>From: Baron Fujimoto
>>[mailto:]
>>
>>Sent: Wednesday, September 09, 2015 5:48 PM
>>To: Chris Hyzer
>>Cc: Grouper Users
>>Subject: Re: [grouper-users] Re: Questions about Grouper logging
>>
>>I still have the situation where everything is winding up in the
>>grouper-api_*.log, regardless of the settings otherwise in the grouper-ui
>>and grouper-ws log4j.properties config files. I'm still unclear on how to
>>separate their logs to their respective log files. They all run under the
>>same instance of Tomcat, if that makes a difference.
>>
>>-baron
>>
>>On Wed, Sep 09, 2015 at 09:27:44PM +0000, Chris Hyzer wrote:
>>>Do you still have questions or are you all set?
>>>
>>>-----Original Message-----
>>>From: Baron Fujimoto
>>>[mailto:]
>>>
>>>Sent: Wednesday, September 09, 2015 5:15 PM
>>>To: Chris Hyzer
>>>Cc: Grouper Users
>>>Subject: Re: [grouper-users] Re: Questions about Grouper logging
>>>
>>>If I understand your question correctly, then yes, each log4j.properties
>>>file specifies its own logfile. I.e.:
>>>
>>>grouper-api/conf/log4j.properties:
>>>log4j.appender.grouper_event.File = ${logdir}/grouper-api_event.log
>>>log4j.appender.grouper_error.File = ${logdir}/grouper-api_error.log
>>>log4j.appender.grouper_debug.File = ${logdir}/grouper-api_debug.log
>>>log4j.appender.grouper_gb.File = ${logdir}/grouper-api_bench.log
>>>
>>>grouper-ui/log4j.properties:
>>>log4j.appender.grouper_event.File = ${logdir}/grouper-ui_event.log
>>>log4j.appender.grouper_error.File = ${logdir}/grouper-ui_error.log
>>>log4j.appender.grouper_debug.File = ${logdir}/grouper-ui_debug.log
>>>log4j.appender.grouper_gb.File = ${logdir}/grouper-ui_bench.log
>>>
>>>grouper-ws/grouper-ws/log4j.properties
>>>log4j.appender.grouper_event.File = ${logdir}/grouper-ws_event.log
>>>log4j.appender.grouper_error.File = ${logdir}/grouper-ws_error.log
>>>log4j.appender.grouper_debug.File = ${logdir}/grouper-ws_debug.log
>>>log4j.appender.grouper_gb.File = ${logdir}/grouper-ws_bench.log
>>>
>>>On Wed, Sep 09, 2015 at 01:16:01PM +0000, Chris Hyzer wrote:
>>>>Is that in each log4j.properties that specifies the log file name?
>>>>
>>>>-----Original Message-----
>>>>From:
>>>>
>>>>
>>>>[mailto:]
>>>> On Behalf Of Baron Fujimoto
>>>>Sent: Wednesday, September 02, 2015 3:49 PM
>>>>To: Grouper Users
>>>>Subject: Re: [grouper-users] Re: Questions about Grouper logging
>>>>
>>>>I've made some progress: each component appears to be logging
>>>>successfully.
>>>>The log4j.properties config file for each component had to be placed in
>>>>the
>>>>following directories:
>>>>
>>>>grouper-api/conf/log4j.properties
>>>>grouper-ui/log4j.properties
>>>>grouper-ws/grouper-ws/log4j.properties
>>>>
>>>>It still isn't clear to me how/where grouper.home is defined for each
>>>>component, so logfiles have been set with absolute paths.
>>>>
>>>>Each component's log4j.properties file was based off of the provided
>>>>sample grouper-api/conf/log4j.example.properties where each of
>>>>
>>>>log4j.appender.grouper_event.File
>>>>log4j.appender.grouper_error.File
>>>>log4j.appender.grouper_debug.File
>>>>
>>>>was set to go to a logfile dedicated for that component. E.g.:
>>>>
>>>>logs/grouper-api.log
>>>>logs/grouper-ui_event.log
>>>>logs/grouper-ws.log
>>>>
>>>>However, everything logged (api, ui, ws) is going to grouper-api.log.
>>>>
>>>>How do I differentiate the output for each component? It's not clear
>>>>from looking at the subset in grouper-ui/log4j.template.properties
>>>>what the relevant properties are. I must be missing something though.
>>>>
>>>>Aloha,
>>>>-baron
>>>>
>>>>On Thu, Aug 27, 2015 at 01:33:40AM -0400, Chris Hyzer wrote:
>>>>>Yes,  You can (and i think should) log each app to it's own log file.  
>>>>>Each one has it's own log4j.properties.  It's either in the webapps dir
>>>>>or the place where you configure tomcat to get the app from in
>>>>>sever.xml.  Stdout will print out where it gets it from on grouper start
>>>>>up
>>>>>
>>>>>log4j.properties read from:  
>>>>>C:\temp\grouperInstaller\grouper.apiBinary-2.0.2\conf\log4j.properties
>>>>>
>>>>>Thanks Chris
>>>>>
>>>>><div>-------- Original message --------</div><div>From: Baron Fujimoto
>>>>><>
>>>>> </div><div>Date:08/26/2015 8:14 PM (GMT-05:00) </div><div>To: Grouper
>>>>>Users
>>>>><>
>>>>> </div><div>Subject: [grouper-users] Re: Questions about Grouper logging
>>>>></div><div>
>>>>></div>Also happy to RTFM if I've overlooked this info somewhere and
>>>>>someone points
>>>>>me to it...
>>>>>
>>>>>On Tue, Aug 25, 2015 at 06:29:08PM -1000, Baron Fujimoto wrote:
>>>>>>I have some (stupid, I fear) questions about configuring Grouper's
>>>>>>logging.
>>>>>>
>>>>>>I have a directory hierarchy that looks like
>>>>>>grouper/
>>>>>> grouper-api/
>>>>>> grouper-ui/
>>>>>> grouper-ws/
>>>>>> logs/
>>>>>> grouper-api/
>>>>>> grouper-ui/
>>>>>> grouper-ws/
>>>>>>
>>>>>>To facilitate troubleshooting, I'd like to be able to have each grouper
>>>>>>component log to their respective log dirs. E.g.:
>>>>>> grouper/logs/grouper-api/
>>>>>> grouper/logs/grouper-ui/
>>>>>> grouper/logs/grouper-ws/
>>>>>>
>>>>>>When I ran the installer interactively, I was prompted for the location
>>>>>>of the grouper-ui and grouper-ws log dirs. This mostly seemed to do what
>>>>>>I wanted. However, the installer installs tomcat 6.35, and we're using
>>>>>>tomcat 8. I think after I cut the grouper apps over to run under our
>>>>>>tomcat 8 instance, I noticed it was no longer logging to those
>>>>>>originally
>>>>>>specified log dirs.
>>>>>>
>>>>>>I see there's a grouper-api/conf/log4j.properties, and a
>>>>>>grouper-ui/log4j.template.properties, but no log4j files under
>>>>>>grouper-ws. Can each component get its own log4j/properties file?
>>>>>>If so, do they go in their respective /conf dirs (the grouper-ui
>>>>>>template isn't in the conf dir, for example)?
>>>>>>
>>>>>>Where is grouper.home defined? Is it the same for each component?

--
Baron Fujimoto
<>
:: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum



Archive powered by MHonArc 2.6.16.

Top of Page