IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
ee793168
Commit
ee793168
authored
4 years ago
by
Lukas Nellen
Committed by
Ralf Ulrich
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Logger default patterns
- names for all patterns - define only once
parent
424bc429
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/detail/framework/core/Logging.inl
+3
-5
3 additions, 5 deletions
corsika/detail/framework/core/Logging.inl
corsika/framework/core/Logging.hpp
+1
-0
1 addition, 0 deletions
corsika/framework/core/Logging.hpp
with
4 additions
and
5 deletions
corsika/detail/framework/core/Logging.inl
+
3
−
5
View file @
ee793168
/*
/*
-*-c++-*-
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
* (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
*
*
* This software is distributed under the terms of the GNU General Public
* This software is distributed under the terms of the GNU General Public
...
@@ -21,15 +21,13 @@ namespace corsika {
...
@@ -21,15 +21,13 @@ namespace corsika {
/*
/*
* The default pattern for CORSIKA8 loggers.
* The default pattern for CORSIKA8 loggers.
*/
*/
std
::
string
const
default_pattern
{
"[%n:%^%-8l%$] %v"
};
inline
auto
set_default_level
(
level
::
level_enum
const
minlevel
)
->
void
{
inline
auto
set_default_level
(
level
::
level_enum
const
minlevel
)
->
void
{
spdlog
::
set_level
(
minlevel
);
spdlog
::
set_level
(
minlevel
);
}
}
template
<
typename
TLogger
>
template
<
typename
TLogger
>
inline
auto
add_source_info
(
TLogger
&
logger
)
->
void
{
inline
auto
add_source_info
(
TLogger
&
logger
)
->
void
{
logger
->
set_pattern
(
"[%n:%^%-8l%$(%s:%!:%#)] %v"
);
logger
->
set_pattern
(
source_pattern
);
}
}
template
<
typename
TLogger
>
template
<
typename
TLogger
>
...
@@ -48,7 +46,7 @@ namespace corsika {
...
@@ -48,7 +46,7 @@ namespace corsika {
// set the default C8 format
// set the default C8 format
#if (!defined(_GLIBCXX_USE_CXX11_ABI) || _GLIBCXX_USE_CXX11_ABI == 1)
#if (!defined(_GLIBCXX_USE_CXX11_ABI) || _GLIBCXX_USE_CXX11_ABI == 1)
logger
->
set_pattern
(
logging
::
default_pattern
);
logger
->
set_pattern
(
default_pattern
);
#else
#else
// special case: gcc from the software collections devtoolset
// special case: gcc from the software collections devtoolset
std
::
string
dp
(
default_pattern
);
std
::
string
dp
(
default_pattern
);
...
...
This diff is collapsed.
Click to expand it.
corsika/framework/core/Logging.hpp
+
1
−
0
View file @
ee793168
...
@@ -50,6 +50,7 @@ namespace corsika {
...
@@ -50,6 +50,7 @@ namespace corsika {
* The default pattern for CORSIKA8 loggers.
* The default pattern for CORSIKA8 loggers.
*/
*/
const
std
::
string
default_pattern
{
"[%n:%^%-8l%$] %v"
};
const
std
::
string
default_pattern
{
"[%n:%^%-8l%$] %v"
};
const
std
::
string
source_pattern
{
"[%n:%^%-8l%$(%s:%!:%#)] %v"
};
/**
/**
* Create a new C8-style logger.
* Create a new C8-style logger.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment