代码拉取完成,页面将自动刷新
/*------------------------------------------------------------------------------
*
* Copyright (c) 2016-Present Pivotal Software, Inc
*
*------------------------------------------------------------------------------
*/
#include <R.h>
#include <Rinternals.h>
#include "common/messages/messages.h"
#include "common/comm_channel.h"
#include "common/comm_utils.h"
#include "rcall.h"
#include "rlogging.h"
static SEXP plr_output(volatile int, SEXP args);
SEXP plr_debug(SEXP args) {
return plr_output(DEBUG2, args);
}
SEXP plr_log(SEXP args) {
return plr_output(LOG, args);
}
SEXP plr_info(SEXP args) {
return plr_output(INFO, args);
}
SEXP plr_notice(SEXP args) {
return plr_output(NOTICE, args);
}
SEXP plr_warning(SEXP args) {
return plr_output(WARNING, args);
}
SEXP plr_error(SEXP args) {
return plr_output(ERROR, args);
}
SEXP plr_fatal(SEXP args) {
return plr_output(FATAL, args);
}
static SEXP plr_output(volatile int level, SEXP args) {
plcConn *conn = plcconn_global;
plcMsgLog *msg;
if (plc_is_execution_terminated == 0) {
char *str_msg = strdup(CHAR(asChar(args)));
if (level >= ERROR)
plc_is_execution_terminated = 1;
msg = pmalloc(sizeof(plcMsgLog));
msg->msgtype = MT_LOG;
msg->level = level;
msg->message = str_msg;
plcontainer_channel_send(conn, (plcMessage *) msg);
free(msg);
free(str_msg);
}
/*
* return a legal object so the interpreter will continue on its merry way
*/
return R_NilValue;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。