Question Eduard Lebedyuk · Apr 25, 2021 messages.log/cconsole.log in SQL? #Beginner #System Administration #InterSystems IRIS Do we have messages.log/cconsole.log projection in SQL? I was sure we do, but unable to find it.
Robert Cemper · Apr 25, 2021 try: ; set file=$system.Util.ManagerDirectory()_"messages.log" open file:("RS"):1 w $T open 2:99 try { for n=1:1 use file read lin use 2 write lin,! } catch { close 2,file write n_" lines",! } ; then use ^SPOOL mapping (OEX) to work on it with SQL
Lorenzo Scalese May 3, 2021 to Eduard Lebedyuk Hi @Eduard Lebedyuk, How about a custom class query (that read cconsole\messages.log) to solve your problem. ?(Robert's solution would be faster to code.)
Hao Ma · Aug 23, 2022 I believe new iris release has structured message log. forget since which release.
try:
; set file=$system.Util.ManagerDirectory()_"messages.log" open file:("RS"):1 w $T open 2:99 try { for n=1:1 use file read lin use 2 write lin,! } catch { close 2,file write n_" lines",! } ;
then use ^SPOOL mapping (OEX) to work on it with SQL
Why would you need it with SQL?
I want to get logs in a structured way.
Hi @Eduard Lebedyuk,
How about a custom class query (that read cconsole\messages.log) to solve your problem. ?
(Robert's solution would be faster to code.)
I believe new iris release has structured message log. forget since which release.