<?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 Using environment variables in log4sas in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443223#M12462</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering how to use environment variable values in log4sas. Our use case: place the workspace server logs for different user groups. A user is member of just one, indicated by environment variable TENANT. If I look at the comparable log4j facility there is a possibility to refer to this by ${env.TENANT}. I was hoping for something similar in log4sas like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%S{env.TENANT}&lt;/PRE&gt;
&lt;P&gt;But unfortunately it is not provided.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I overlooking something? Is there another way to accomplish the same (short of specifying a separate logconfig.xml for each user group)? Would, if needed, a feature request garner your support?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 09:28:17 GMT</pubDate>
    <dc:creator>jklaverstijn</dc:creator>
    <dc:date>2018-03-07T09:28:17Z</dc:date>
    <item>
      <title>Using environment variables in log4sas</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443223#M12462</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering how to use environment variable values in log4sas. Our use case: place the workspace server logs for different user groups. A user is member of just one, indicated by environment variable TENANT. If I look at the comparable log4j facility there is a possibility to refer to this by ${env.TENANT}. I was hoping for something similar in log4sas like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%S{env.TENANT}&lt;/PRE&gt;
&lt;P&gt;But unfortunately it is not provided.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I overlooking something? Is there another way to accomplish the same (short of specifying a separate logconfig.xml for each user group)? Would, if needed, a feature request garner your support?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;- Jan.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 09:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443223#M12462</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2018-03-07T09:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using environment variables in log4sas</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443227#M12463</link>
      <description>&lt;P&gt;Doesn't&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%sysget(TENANT)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;do it?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 09:39:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443227#M12463</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-07T09:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using environment variables in log4sas</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443237#M12464</link>
      <description>&lt;P&gt;Unfortunately not in the logconfig.xml, Kurt. This is not SAS code but XML configuration. Sorry for not being more clearly about this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 10:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443237#M12464</guid>
      <dc:creator>jklaverstijn</dc:creator>
      <dc:date>2018-03-07T10:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using environment variables in log4sas</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443239#M12465</link>
      <description>&lt;P&gt;Hi Jan,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see that documentation for SAS ESP 4.3/5.1 and SAS DataFlux Data Management Server 2.6&amp;nbsp;have examples of&amp;nbsp;the form %S{OSENV.env_var_name} in their logging XML -&amp;nbsp;e.g. &lt;A href="https://support.sas.com/kb/60/591.html" target="_blank"&gt;https://support.sas.com/kb/60/591.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's another example of it at&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/The-Node-Less-Traveled-Improving-Job-Performance-with-Node/ta-p/221293" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/The-Node-Less-Traveled-Improving-Job-Performance-with-Node/ta-p/221293&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I note that OSENV isn't documented as a key for the &lt;A href="http://documentation.sas.com/?docsetId=logug&amp;amp;docsetTarget=p0zzs5v8e3la1fn1694o9bf5nn79.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;S Conversion Character&lt;/A&gt; in the &lt;EM&gt;SAS 9.4 Logging: Configuration and Programming Reference&lt;/EM&gt; but it'd be worth a try - you never know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 11:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443239#M12465</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2018-03-07T11:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using environment variables in log4sas</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443240#M12466</link>
      <description>&lt;P&gt;Ah. The first thing google gave me was the %log4sas autocall macro, so I was thinking SAS code.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 11:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443240#M12466</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-07T11:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using environment variables in log4sas</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443243#M12468</link>
      <description>&lt;P&gt;I was curious so I tried&amp;nbsp;it out with the RollingFileAppender FileNamePattern value in a SAS 9.4 M5 Workspace Server logconfig.xml and it seems to work (even though it is not documented). Probably best to ask SAS tech support if it is supported and what SAS versions it works with.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 22:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Using-environment-variables-in-log4sas/m-p/443243#M12468</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2018-03-07T22:07:03Z</dc:date>
    </item>
  </channel>
</rss>

