<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Colorized Text in the EG Log? in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251926#M17768</link>
    <description>&lt;P&gt;Yeah, normally, the basic SAS EG color scheme is fine. &amp;nbsp;Occasionally, I want to display some type of message that while not an error needs to stand out. &amp;nbsp;I could use ERROR: &amp;nbsp;but then that changes which programs execute within my workflow. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here's an example of a user supplied series of Notes. &amp;nbsp;Everything is in green since it's all generated by "NOTE:" &amp;nbsp;or "NOTE-". &amp;nbsp;I was hoping there was some other prefix like "USER" or some such that I could use to set apart particular messages, such as the dates and ages in the below example. &amp;nbsp;Looks like I'm out of luck. I'll look into the SAS ballot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way the the SAS supplied age calculation&amp;nbsp;--&amp;nbsp;int(yrDif(birthDate, asOfDate, 'AGE')) ;&amp;nbsp;-- doesn't work correctly if person is born on February 29th. &amp;nbsp;It will increment their age on February 28th even in Leap Years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2006i18F135E72AD3B73E/image-size/large?v=mpbl-1&amp;amp;px=-1" border="0" alt="SAS_EG_Color_Example.jpg" title="SAS_EG_Color_Example.jpg" /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Feb 2016 00:56:53 GMT</pubDate>
    <dc:creator>jimbarbour</dc:creator>
    <dc:date>2016-02-24T00:56:53Z</dc:date>
    <item>
      <title>Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251828#M17766</link>
      <description>&lt;P&gt;Is there a way to change the color of the text written to the EG log? &amp;nbsp;I'm using SAS EG, Brontosaurus version -- oops , I mean version 4.3. &amp;nbsp;No, I don't know why my company is stuck in the Mesozoic era; believe me I've complained. &amp;nbsp;The version of SAS we're using is 9.3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I know about using NOTE, WARNING, and ERROR. &amp;nbsp;I see something called Message in the EG editor options, but a quick try of&lt;BR /&gt;PUTLOG "MESSAGE: &amp;nbsp;Is this text colorized?";&lt;BR /&gt;didn't produce any colorization.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2000i351CB64688DF7CDE/image-size/large?v=mpbl-1&amp;amp;px=-1" border="0" alt="SAS_EG_Editor_Options_Log.jpg" title="SAS_EG_Editor_Options_Log.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I'm basically looking for a way to make certain user created messages to stand out from all the other NOTE messages without triggering an error or warning. &amp;nbsp;Googling SAS Dummy and Communities doesn't turn up anything.&lt;BR /&gt;&lt;BR /&gt;Thanks for any help,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 18:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251828#M17766</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-02-23T18:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251831#M17767</link>
      <description>&lt;P&gt;Interesting question.&amp;nbsp; If it can't be done now, please submit it as a SASware Ballot Idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally, I color notes as blue, warnings as reverse green, and errors as reverse-red.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For user-generated notes I either use NOTE: prefix which will make them blue like the SAS generated notes, or leave them as default black.&amp;nbsp; The black is unusual enough to catch my&amp;nbsp;attention most of the time, because it's the only black text that is not indented:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="logcolor.JPG" alt="logcolor.JPG" src="https://communities.sas.com/t5/image/serverpage/image-id/2001iC32EA960D3BBD2F1/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And of course if it's essential that it catch my attention, I just make it an error.&amp;nbsp; Often I use NOTE: (USER) or EROR: (USER) so that I can distinguish the user-generated messages from SAS-generated messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, if there were an easy way to customize a coloring scheme for user-generated messages, that would be nice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2016 19:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251831#M17767</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-02-23T19:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251926#M17768</link>
      <description>&lt;P&gt;Yeah, normally, the basic SAS EG color scheme is fine. &amp;nbsp;Occasionally, I want to display some type of message that while not an error needs to stand out. &amp;nbsp;I could use ERROR: &amp;nbsp;but then that changes which programs execute within my workflow. &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here's an example of a user supplied series of Notes. &amp;nbsp;Everything is in green since it's all generated by "NOTE:" &amp;nbsp;or "NOTE-". &amp;nbsp;I was hoping there was some other prefix like "USER" or some such that I could use to set apart particular messages, such as the dates and ages in the below example. &amp;nbsp;Looks like I'm out of luck. I'll look into the SAS ballot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way the the SAS supplied age calculation&amp;nbsp;--&amp;nbsp;int(yrDif(birthDate, asOfDate, 'AGE')) ;&amp;nbsp;-- doesn't work correctly if person is born on February 29th. &amp;nbsp;It will increment their age on February 28th even in Leap Years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2006i18F135E72AD3B73E/image-size/large?v=mpbl-1&amp;amp;px=-1" border="0" alt="SAS_EG_Color_Example.jpg" title="SAS_EG_Color_Example.jpg" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 00:56:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251926#M17768</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-02-24T00:56:53Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251978#M17771</link>
      <description>&lt;P&gt;The SAS log is a simple text file, with no formatting at all. This will stay that way, as changing that would break a gazillion of things.&lt;/P&gt;
&lt;P&gt;The colouring is done by the agent displaying the log, as it interprets the semantics of the log messages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the simple answer to your question is a clear "no".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you could do is write some kind of utility that reads a log, converts it to a file format that does contain formatting (ie HTML), and add formatting tags depending on the content of the log. That is what the log display in EG does internally.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 07:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251978#M17771</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-24T07:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251984#M17772</link>
      <description>&lt;P&gt;Interesting idea, Kurt. &amp;nbsp;One could also use something like TextPad (not NotePad, not WordPad) or perhaps UltraEdit. &amp;nbsp;These are configurable as to their colorization, and if I recall correctly rules can be added to colorize things like lines beginning with "USER:" or some such. &amp;nbsp;If one were to use PRINTTO and then pull the log into one of these editors, then one would have the desired results. &amp;nbsp;This of course requires a bit more programming and a bit more manual intervention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still might be a good suggestion for a SAS ballot although I can't imagine it would be a big priority.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course the other alternative if there's a "must see" message in the log is to simply email it to oneself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 07:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251984#M17772</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-02-24T07:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251986#M17773</link>
      <description>&lt;P&gt;Since all that you want takes place inside EG, I also suggest you start a ballot.&lt;/P&gt;
&lt;P&gt;Request that users can add their own patterns (regexp?) for recognization by the Enhanced Editor so that a distinct coloring of certain log entries can be achieved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do specific evaluation of batch job logs in the wrapper sasbatch script (using grep) to catch certain messages that indicate fault conditions which would otherwise go undetected (ie certain mainframe-specific FTP status codes)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 08:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/251986#M17773</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-24T08:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252026#M17774</link>
      <description>&lt;P&gt;Here's the way that coloring happens in the EG log viewer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS generates a SAS log in which each log line has a two-byte indicator that tells us "what type" of line it is: Normal, Note, Error, Warning, and so on. &amp;nbsp;I've described this in a &lt;A href="http://support.sas.com/resources/papers/proceedings13/003-2013.pdf" target="_self"&gt;paper about building your own SAS client app&lt;/A&gt;&amp;nbsp;- look for the section titled "FETCHING THE COLOR-CODED SAS LOG AND LISTING".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So if you want to achieve custom coloring that is attached to the "Message" line type in your preferences, you need to convince SAS to emit a log line that is categorized with the Message type. &amp;nbsp;But I don't know how to force a "Message" line type to the log. &amp;nbsp;I'll check with some experts here to see if it can be done from within a SAS program.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 12:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252026#M17774</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-02-24T12:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252044#M17775</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Were that possible (causing SAS EG to set the two byte color indicator from within a SAS program), that would be fantastic. &amp;nbsp;I look forward to what you may find out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 14:17:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252044#M17775</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-02-24T14:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252051#M17776</link>
      <description>&lt;P&gt;Jim,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did learn something, but it's not&amp;nbsp;&lt;STRONG&gt;the&lt;/STRONG&gt; answer. &amp;nbsp;Sharing in case it's helpful to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS has a facility called Log4SAS that was added in SAS 9.2. &amp;nbsp;You can use it to direct custom messages to your log at various levels of detail. &amp;nbsp;It's also used by SAS to help diagnose issues encountered by customers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/logug/67485/HTML/default/viewer.htm#p07c5twte0akfxn1ijvoxdvhv7oo.htm" target="_self"&gt;Learn about Log4SAS here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example program:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename rev1 temp;
%log4sas();
%log4sas_appender(testout, "FileRefAppender", 'fileref=rev1');
%log4sas_logger(logger, 'level=trace appender-ref=(testout)');

%log4sas_info(logger,"Test INFO message");
%log4sas_debug(logger,"Test DEBUG message");
%log4sas_trace(logger,"Test TRACE message");
%log4sas_warn(logger,"Test WARNING message");
%log4sas_error(logger,"Test ERROR message");
%log4sas_fatal(logger,"Test FATAL message");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Alas, while the WARNING, INFO, ERROR, and FATAL produce the usual colored lines, DEBUG and TRACE do not -- they use the "Normal" line type in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still checking, but don't hold out much hope that your SAS program can generate a "Message" type log entry. &amp;nbsp;This type might be used more by interactive SAS and not the SAS language service that is utilized by clients like EG.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 14:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252051#M17776</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-02-24T14:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252156#M17777</link>
      <description>&lt;P&gt;It doesn't look like I have that option (of using SAS4log) here at work. &amp;nbsp;I'll have to try it on my own machine when I get home this evening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 19:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252156#M17777</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-02-24T19:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized Text in the EG Log?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252312#M17780</link>
      <description>&lt;P&gt;Intersting. &amp;nbsp;log4SAS works great on my University Edition SAS (v 9.4) at home. &amp;nbsp;Didn't work at my office. &amp;nbsp;Must be some setting. &amp;nbsp;I used the custom task that you posted on Dummy some time ago to show the settings, and option&amp;nbsp;&lt;SPAN&gt;MAUTOSOURCE appeared to be in operation, but no go.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Log4SAS is a nice little option in that it writes simultaneously to the SAS log as well as to an external log file. &amp;nbsp;Would that it would colorize the content of the log however (beyond the standard three: &amp;nbsp;NOTE, WARNING, and ERROR).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you come up with anything, I would love to hear it, but no worries inasmuch as there are multiple work arounds including parsing routines for the log, emailing messages to oneself, etc.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It would of course be a wonderful "someday" enhancement to SAS EG to have a message type reserved exclusively for the user where all one had to do is prefix said message with something like "MESSAGE:" much like one would do with "NOTE:" (etc.) today. &amp;nbsp;Thus, one could easily pick out messages that were specifically written by the application programmer both by color and by textual content. &amp;nbsp;It would also be nice if SAS EG could dispense soft serve ice cream on a hot day. &amp;nbsp;Neither wish is necessarily reasonable, but I hope that at least one of the two will come true. &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jim&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2016 07:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Colorized-Text-in-the-EG-Log/m-p/252312#M17780</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2016-02-25T07:33:41Z</dc:date>
    </item>
  </channel>
</rss>

