Thatcher,

We are Using cas 6.2. I am not sure what version we started with syslog output.
log4j2 is quite an improvement over 1.2.

You may find it more beneficial to spend the time upgrading cas instead of 
working with the old log4j.

Ray

On Tue, 2021-04-13 at 08:53 -0700, Thatcher Rea wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

Thanks Ray, syslog is running and accessible.
This is using the version 1.2 of log4j - Is the config example you pasted from 
CAS 4.0.x ?

Many thanks

On Tuesday, April 13, 2021 at 10:43:33 AM UTC-5 Ray Bon wrote:
Thatcher,

Is syslog running and accessible?

This is what we use for syslog:


        <Socket name="syslogAppender" host="localhost" port="1514" 
protocol="TCP">
<PatternLayout>
<pattern>&lt;%level{TRACE=169, DEBUG=175, INFO=174, WARN=172, ERROR=171, 
Fatal=168}&gt;%d{yyyy-MM-dd}T%d{HH:mm:ss.SSS} cas_app[%pid]: ${env:NAME}: %-5p 
%t(%T) %c{10} - %m%n%ex{none}</pattern>
            </PatternLayout>
        </Socket>


        <CasAppender name="syslog">
            <AppenderRef ref="syslogAppender" />
        </CasAppender>

You can ignore the pattern element or modify to suit your needs.

If you are using the old log4j (version 1.2, I think), you may be able to use 
documentation from that version.

Ray

On Tue, 2021-04-13 at 06:50 -0700, Thatcher Rea wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

As the title suggests i'm trying to get this working - I found this bit of info 
in the documentation:

https://apereo.github.io/cas/4.2.x/installation/Monitoring-Statistics.html#routing-logs-to-syslog

But we're using 4.0.1 of CAS - attempting to apply this directive as is results 
in numerous errors.

log4j:WARN Element type "Appenders" must be declared.
log4j:WARN Continuable parsing error 27 and column 41
log4j:WARN Element type "Syslog" must be declared.
log4j:WARN Continuable parsing error 173 and column 23
log4j:WARN The content of element type "log4j:configuration" must match 
"(renderer*,throwableRenderer?,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".
log4j:WARN Unrecognized element Appenders
log4j:ERROR No appender named [SYSLOG] could be found.

If I change "Appenders" to "appender" as declared in other sections of the 
config I get a stack trace and various problems when starting this in the 
tomcat container. Any advice would be appreciated.

--

Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831<tel:(250)%20721-8831> | CLE 019 | [email protected]

I respectfully acknowledge that my place of work is located within the 
ancestral, traditional and unceded territory of the Songhees, Esquimalt and 
WSÁNEĆ Nations.


--

Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE 019 | [email protected]<mailto:[email protected]>

I respectfully acknowledge that my place of work is located within the 
ancestral, traditional and unceded territory of the Songhees, Esquimalt and 
WSÁNEĆ Nations.

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/6c9066b19a586c8636fbbf01f039022b382ee6f5.camel%40uvic.ca.

Reply via email to