Interesting, thanks Ray!

I was thinking more along the lines of audit info only, but outputting 
exceptions in one line might be useful too.  I wonder if my IDE would auto-link 
to the source code lines if it was all jumbled into one line, I'll have to take 
a look. :D

On 9/3/19 12:06 PM, Ray Bon wrote:
Auditing should be converted to a single line with the property given by Daniel.
If you have other multi line log output (I am looking at you exception stack 
traces), one of our logging experts came up with this (you will have to look up 
the specifics of %replace but I think in this case it just removes them):


       <Socket name="syslogAppender" host="localhost" port="1514" 
protocol="TCP">
           <PatternLayout>
               <pattern>&lt;%level{WARN=28, DEBUG=31, ERROR=27, TRACE=31, INFO=30, 
FATAL=25}&gt;%d{MMM dd HH:mm:ss} ${hostName} CAS: %c %replace{%m}{\n+}{&lt;31&gt;CAS: TRACE: 
}%n</pattern>
           </PatternLayout>
       </Socket>

Ray

On Tue, 2019-08-27 at 22:11 +0200, Fabrice Bacchella wrote:
The  JSON is generated directly by CAS and generated in a single log4j event. 
So perhaps if you play with the log4j and use a separator that is not a new 
line, a \0 for example, it might do the trick. I'm using mpsgack to remotely 
send them and so I have no separator problems.

Le 27 août 2019 à 21:49, Trenton D. Adams 
<[email protected]<mailto:[email protected]>> a écrit :


No, I was thinking along those lines as well, but didn't know it had that 
feature.  I know log4j2 has that feature, but then you'd get a bunch of 
newlines wrapped as '\n'.  I'll look into it, thanks!

On 8/27/19 9:23 AM, Fabrice Bacchella wrote:
Did you try to set 'cas.audit.slf4j.auditFormat' to 'JSON' ?

The service URL/id is missing indeed.

Le lundi 26 août 2019 23:35:30 UTC+2, Trenton D. Adams a écrit :
Hi Guys,

When it comes to system administration and diagnostics, it is quite
common to use standard Linux utilities for debugging. Things like grep,
awk, sed, cut, etc.  The CAS logs make this quite difficult.  Could we
maybe start composing the logs into single line "records" of a sort?

for example, the following is not easily processed using the cli...

=============================================================
WHO: someone
WHAT: ST-54765-7eEtYFJT1VBZ2Ssexczzf7FE5ow-tst-cas-01
ACTION: SERVICE_TICKET_VALIDATED
APPLICATION: CAS
WHEN: Mon Aug 26 15:27:53 MDT 2019
CLIENT IP ADDRESS: 123.123.123.123
SERVER IP ADDRESS: server.example.com<http://server.example.com/>
=============================================================

I've been working around it in a somewhat clunky way by doing the
following, but this really is just a hack.

tail -f /var/log/cas/cas.log | egrep 'CLIENT IP ADDRESS|ACTION|WHAT'

Also, for service ticket validations it would be nice if they included
the service url.

Thanks.

--
Trenton D. Adams
Senior Systems Analyst/Web Software Developer
Applications Unit - ITS
Athabasca University
(780) 675-6195

It is only when you are surrounded by a supportive team, that you can achieve
your best.  Instead of tearing people down, try building them up!

--
This communication is intended for the use of the recipient to whom it is 
addressed, and may contain confidential, personal, and or privileged 
information. Please contact us immediately if you are not the intended 
recipient of this communication, and do not copy, distribute, or take action 
relying on it. Any communications received in error, or subsequent reply, 
should be deleted or destroyed.
---


--

Trenton D. Adams

Senior Systems Analyst/Web Software Developer

Applications Unit - ITS

Athabasca University

(780) 675-6195




It is only when you are surrounded by a supportive team, that you can achieve

your best.  Instead of tearing people down, try building them up!

--
This communication is intended for the use of the recipient to whom it is 
addressed, and may contain confidential, personal, and or privileged 
information. Please contact us immediately if you are not the intended 
recipient of this communication, and do not copy, distribute, or take action 
relying on it. Any communications received in error, or subsequent reply, 
should be deleted or destroyed.
---


--


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.

--
Trenton D. Adams
Senior Systems Analyst/Web Software Developer
Applications Unit - ITS
Athabasca University
(780) 675-6195

It is only when you are surrounded by a supportive team, that you can achieve
your best.  Instead of tearing people down, try building them up!

--
This communication is intended for the use of the recipient to whom it is 
addressed, and may contain confidential, personal, and or privileged 
information. Please contact us immediately if you are not the intended 
recipient of this communication, and do not copy, distribute, or take action 
relying on it. Any communications received in error, or subsequent reply, 
should be deleted or destroyed.
---

--
- 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/828cd0a5-7281-de51-dd31-d7fe28f06378%40athabascau.ca.

Reply via email to