Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
7d6e937b
Unverified
Commit
7d6e937b
authored
Jul 03, 2023
by
Dominik Charousset
Committed by
GitHub
Jul 03, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1465
Remove the logger.inline-output parameter
parents
3d18029e
4a8b213b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
8 deletions
+9
-8
libcaf_core/caf/logger.hpp
libcaf_core/caf/logger.hpp
+6
-0
libcaf_core/src/actor_system.cpp
libcaf_core/src/actor_system.cpp
+3
-0
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+0
-3
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+0
-3
libcaf_core/test/settings.cpp
libcaf_core/test/settings.cpp
+0
-1
libcaf_test/caf/test/dsl.hpp
libcaf_test/caf/test/dsl.hpp
+0
-1
No files found.
libcaf_core/caf/logger.hpp
View file @
7d6e937b
...
...
@@ -273,6 +273,12 @@ private:
logger
(
actor_system
&
sys
);
// -- called by the actor_system when running with a test coordinator --------
void
inline_output
(
bool
value
)
noexcept
{
cfg_
.
inline_output
=
value
;
}
// -- initialization ---------------------------------------------------------
void
init
(
actor_system_config
&
cfg
);
...
...
libcaf_core/src/actor_system.cpp
View file @
7d6e937b
...
...
@@ -351,6 +351,9 @@ actor_system::actor_system(actor_system_config& cfg)
// Initialize state for each module and give each module the opportunity to
// adapt the system configuration.
logger_
->
init
(
cfg
);
// When running with the test coordinator, generate logs in the same thread.
if
(
!
scheduler
().
detaches_utility_actors
())
logger_
->
inline_output
(
true
);
CAF_SET_LOGGER_SYS
(
this
);
for
(
auto
&
mod
:
modules_
)
if
(
mod
)
...
...
libcaf_core/src/actor_system_config.cpp
View file @
7d6e937b
...
...
@@ -71,8 +71,6 @@ actor_system_config::actor_system_config()
"frequency of relaxed steal attempts"
)
.
add
<
timespan
>
(
"relaxed-sleep-duration"
,
"sleep duration between relaxed steal attempts"
);
opt_group
{
custom_options_
,
"caf.logger"
}
//
.
add
<
bool
>
(
"inline-output"
,
"disable logger thread (for testing only!)"
);
opt_group
{
custom_options_
,
"caf.logger.file"
}
.
add
<
string
>
(
"path"
,
"filesystem path for the log file"
)
.
add
<
string
>
(
"format"
,
"format for individual log file entries"
)
...
...
@@ -121,7 +119,6 @@ settings actor_system_config::dump_content() const {
defaults
::
work_stealing
::
relaxed_sleep_duration
);
// -- logger parameters
auto
&
logger_group
=
caf_group
[
"logger"
].
as_dictionary
();
// Note: omit "inline-output" option since it should only be used for testing.
auto
&
file_group
=
logger_group
[
"file"
].
as_dictionary
();
put_missing
(
file_group
,
"path"
,
defaults
::
logger
::
file
::
path
);
put_missing
(
file_group
,
"format"
,
defaults
::
logger
::
file
::
format
);
...
...
libcaf_core/src/logger.cpp
View file @
7d6e937b
...
...
@@ -308,9 +308,6 @@ void logger::init(actor_system_config& cfg) {
=
parse_format
(
get_or
(
cfg
,
"caf.logger.file.format"
,
lg
::
file
::
format
));
console_format_
=
parse_format
(
get_or
(
cfg
,
"caf.logger.console.format"
,
lg
::
console
::
format
));
// Set flags.
if
(
get_or
(
cfg
,
"caf.logger.inline-output"
,
false
))
cfg_
.
inline_output
=
true
;
// If not set to `false`, CAF enables colored output when writing to TTYs.
cfg_
.
console_coloring
=
get_or
(
cfg
,
"caf.logger.console.colored"
,
true
);
}
...
...
libcaf_core/test/settings.cpp
View file @
7d6e937b
...
...
@@ -32,7 +32,6 @@ struct fixture {
logger
[
"console-format"
]
=
"%m"
;
logger
[
"console-verbosity"
]
=
"trace"
;
logger
[
"file-format"
]
=
"%r %c %p %a %t %C %M %F:%L %m%n"
;
logger
[
"inline-output"
]
=
false
;
auto
&
middleman
=
x
[
"middleman"
].
as_dictionary
();
middleman
[
"app-identifiers"
]
=
make_config_value_list
(
"generic-caf-app"
);
middleman
[
"enable-automatic-connections"
]
=
false
;
...
...
libcaf_test/caf/test/dsl.hpp
View file @
7d6e937b
...
...
@@ -700,7 +700,6 @@ public:
caf
::
test
::
engine
::
argv
()))
CAF_FAIL
(
"failed to parse config: "
<<
to_string
(
err
));
cfg
.
set
(
"caf.scheduler.policy"
,
"testing"
);
cfg
.
set
(
"caf.logger.inline-output"
,
true
);
if
(
cfg
.
custom_options
().
has_category
(
"caf.middleman"
))
{
cfg
.
set
(
"caf.middleman.network-backend"
,
"testing"
);
cfg
.
set
(
"caf.middleman.manual-multiplexing"
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment