File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ void Trace::fillDefaultConfig(Json &cfg) const
37
37
cfg[" trace" ] = R"(
38
38
{
39
39
"enable": false,
40
- "path_prefix": "/tmp/trace/unknown",
41
40
"max_size": 1024,
42
41
"enable_sync": false
43
42
}
@@ -63,24 +62,21 @@ bool Trace::initialize(Context &ctx, const Json &cfg)
63
62
64
63
auto &sink = trace::Sink::GetInstance ();
65
64
66
- if (!path_prefix.empty ()) {
67
- sink.setPathPrefix (path_prefix);
68
- if (is_enable)
69
- sink.enable ();
70
- }
71
-
72
65
if (max_size > 0 )
73
66
sink.setRecordFileMaxSize (1024 * max_size);
74
67
75
68
if (is_enable_sync)
76
69
sink.setFileSyncEnable (true );
70
+
71
+ if (sink.setPathPrefix (path_prefix) && is_enable)
72
+ sink.enable ();
77
73
}
78
74
return true ;
79
75
}
80
76
81
77
void Trace::initShell (TerminalNodes &term)
82
78
{
83
- auto trace_node = term.createDirNode (" This is log directory" );
79
+ auto trace_node = term.createDirNode (" This is trace directory" );
84
80
term.mountNode (term.rootNode (), trace_node, " trace" );
85
81
86
82
{
You can’t perform that action at this time.
0 commit comments