如何让SAS登录外部位置和SAS企业指南 [英] How to have sas log in both external location and sas enterprise guide

查看:123
本文介绍了如何让SAS登录外部位置和SAS企业指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用sas,例如5.1版本.现在,我将日志详细信息路由到外部文件(文本文档)以进行记录保存.但是在开发代码时,我希望错误日志也出现在sas egp日志窗口中,以使调试更快,更容易

I am using sas eg 5.1 version. right now I am routing my log details to an external file(text document) for record keeping. But while developing a code, I want the error log to appear in the sas egp log window also, so that it makes debugging faster and easy

所以我的问题是如何同时在sas egp和外部文件中同时拥有sas日志详细信息

我尝试搜索它,但是无法获取详细信息.

I tried searching for it, but could not get the details.

预先感谢

推荐答案

没有会话中"可编程选项可将日志写入多个目标.但是,体面的破解"是简单地读取您的外部日志并按如下所示写出您的会话日志:

There is no 'in session' programmable option to write the log to multiple destinations. However a decent 'hack' is to simply read your external log and write out to your session log as follows:

/* write to external log */
filename tmp "C:\temp\mylog.txt";
proc printto log=tmp; run;

/* now run your SAS code */
%put NOTE: processing lots of juicy SAS statements;

/* once done, return to normal logging */
proc printto log=log; run; 

/* print previous log to current session */
data _null_;
  infile tmp;
  input; list;
run;

/* close filename */
filename tmp clear;

为确保始终写出注销信息或将其取回,甚至可以将以上内容拆分为以下位置:

To ensure you always write the log out / get it back, you could even split the above into the following locations:

其他选项:

管理员可以启用日志记录在应用程序(工作区)服务器上.这将捕获来自所有用户的所有日志-这确实对性能和存储有影响!步骤如下:

An admin can enable logging on the application (workspace) server. This will capture all logs, from all users - which does have performance and storage implications! Steps as follows:

  • 导航至:[sasconfig] \ Lev1 \ SASApp \ WorkspaceServer
  • 将logconfig.xml重命名为logconfig.xml.orig
  • 将Logconfix.trace.xml重命名为 logconfig.xml
  • 重新启动对象生成器
  • Navigate to: [sasconfig]\Lev1\SASApp\WorkspaceServer
  • Rename logconfig.xml to logconfig.xml.orig
  • Rename Logconfix.trace.xml to logconfig.xml
  • Restart the object spawner

@Quentin/@Reeza在此(非常相似)中提出的另一种方法

Another approach, as proposed by @Quentin / @Reeza in this (very similar) question, is to use the -altlog option at SAS invocation.

最后,如果适合的话,您可以考虑启用EG

Finally, if it suits, you could look at enabling the EG project log.

这篇关于如何让SAS登录外部位置和SAS企业指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆