Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
1a3584e3
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1a3584e3
编写于
4月 16, 2018
作者:
W
wanderingbort
提交者:
GitHub
4月 16, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2431 from EOSIO/net_logging_mod
Modify net_plugin's logging initialization
上级
ded96faa
79c516ae
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
19 deletion
+4
-19
plugins/net_plugin/net_plugin.cpp
plugins/net_plugin/net_plugin.cpp
+4
-19
未找到文件。
plugins/net_plugin/net_plugin.cpp
浏览文件 @
1a3584e3
...
...
@@ -265,7 +265,7 @@ namespace eosio {
};
const
fc
::
string
logger_name
(
"net_plugin_impl"
);
fc
::
logger
logger
(
logger_name
)
;
fc
::
logger
logger
;
template
<
class
enum_type
,
class
=
typename
std
::
enable_if
<
std
::
is_enum
<
enum_type
>
::
value
>::
type
>
inline
enum_type
&
operator
|=
(
enum_type
&
lhs
,
const
enum_type
&
rhs
)
...
...
@@ -2666,24 +2666,6 @@ namespace eosio {
void
net_plugin
::
plugin_initialize
(
const
variables_map
&
options
)
{
ilog
(
"Initialize net plugin"
);
// Housekeeping so fc::logger::get() will work as expected
fc
::
get_logger_map
()[
logger_name
]
=
logger
;
// Setting a parent would in theory get us the default appenders for free but
// a) the parent's log level overrides our own in that case; and
// b) fc library's logger was never finished - the _additivity flag tested is never true.
for
(
fc
::
shared_ptr
<
fc
::
appender
>&
appender
:
fc
::
logger
::
get
().
get_appenders
())
{
logger
.
add_appender
(
appender
);
}
if
(
options
.
count
(
"log-level-net-plugin"
)
)
{
fc
::
log_level
logl
;
fc
::
from_variant
(
options
.
at
(
"log-level-net-plugin"
).
as
<
string
>
(),
logl
);
ilog
(
"Setting net_plugin logging level to ${level}"
,
(
"level"
,
logl
));
logger
.
set_log_level
(
logl
);
}
my
->
network_version
=
static_cast
<
uint16_t
>
(
app
().
version
());
my
->
network_version_match
=
options
.
at
(
"network-version-match"
).
as
<
bool
>
();
my
->
send_whole_blocks
=
def_send_whole_blocks
;
...
...
@@ -2803,6 +2785,9 @@ namespace eosio {
for
(
auto
seed_node
:
my
->
supplied_peers
)
{
connect
(
seed_node
);
}
if
(
fc
::
get_logger_map
().
find
(
logger_name
)
!=
fc
::
get_logger_map
().
end
())
logger
=
fc
::
get_logger_map
()[
logger_name
];
}
void
net_plugin
::
plugin_shutdown
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录