Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
CoMISo
Base
Commits
6542e0c7
Commit
6542e0c7
authored
Apr 30, 2020
by
Martin Marinov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'Base/master' into merge-from-ReForm
parents
11d5b5f8
c133e45f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
Debug/DebConfig.hh
Debug/DebConfig.hh
+21
-14
No files found.
Debug/DebConfig.hh
View file @
6542e0c7
// (C) Copyright 20
19
by Autodesk, Inc.
// (C) Copyright 20
20
by Autodesk, Inc.
#ifndef BASE_DEBCONFIG_HH_INCLUDED
#ifndef BASE_DEBCONFIG_HH_INCLUDED
#define BASE_DEBCONFIG_HH_INCLUDED
#define BASE_DEBCONFIG_HH_INCLUDED
...
@@ -7,11 +7,12 @@
...
@@ -7,11 +7,12 @@
#include <Base/Config/BaseDefines.hh>
#include <Base/Config/BaseDefines.hh>
#include <string>
#include <string>
namespace
Debug
{
namespace
Debug
{
void
print_char_to_cerr
(
const
char
_c
);
//!< print a char to cerr
void
print_char_to_cerr
(
const
char
_c
);
//!< print a char to cerr
/*!
/*!
Access the global, per-process, configuration options of the Debug system.
Access the global, per-process, configuration options of the Debug system.
\todo Make this a per-thread configuration.
\todo Make this a per-thread configuration.
*/
*/
...
@@ -26,31 +27,37 @@ public:
...
@@ -26,31 +27,37 @@ public:
static
Config
&
modify
();
static
Config
&
modify
();
//! Query the current configuration.
//! Query the current configuration.
static
const
Config
&
query
();
static
const
Config
&
query
();
//! Query the default configuration.
//! Query the default configuration.
static
const
Config
&
defaults
();
static
const
Config
&
defaults
();
public:
public:
//! The output level for all code in the absence of a config file.
//! The output level for all code in the absence of a config file.
int
output_level
=
5
;
int
output_level
=
5
;
//! The deb out log filename, nullptr disables the debug output log file.
//! The deb out log filename, nullptr disables the debug output log file.
const
char
*
log_filename
=
nullptr
;
const
char
*
log_filename
=
nullptr
;
//! Get if the log file output is enabled
bool
logfile
()
const
{
return
log_filename
!=
nullptr
;
}
//! Function to deb out on the console, nullptr if output disabled.
//! Function to deb out on the console, nullptr if output disabled.
print_function
console_print
=
print_char_to_cerr
;
print_function
console_print
=
print_char_to_cerr
;
//! Get if the console
bool
console
()
const
{
return
console_print
!=
nullptr
;
}
public:
public:
//! The output level for the given filename and function.
//! The output level for the given filename and function.
int
custom_level
(
const
char
*
const
_flnm
,
const
char
*
const
_fnct
)
const
;
int
custom_level
(
const
char
*
const
_flnm
,
const
char
*
const
_fnct
)
const
;
/*!
/*!
Load the configuration file specified either by the environment variable
Load the configuration file specified either by the environment variable
or the filename if the the environment variable is not set.
or the filename if the the environment variable is not set.
\todo Document the config format.
\todo Document the config format.
\return true if the configuration file was loaded properly, false otherwise.
\return true if the configuration file was loaded properly, false otherwise.
*/
*/
bool
load
(
const
char
*
const
_cnfg_envr
,
const
char
*
const
_cnfg_flnm
);
bool
load
(
const
char
*
const
_cnfg_envr
,
const
char
*
const
_cnfg_flnm
);
private:
private:
...
@@ -71,9 +78,9 @@ private:
...
@@ -71,9 +78,9 @@ private:
//! Disable assignment
//! Disable assignment
Config
&
operator
=
(
const
Config
&
);
Config
&
operator
=
(
const
Config
&
);
};
};
};
//
namespace Debug
};
//
namespace Debug
#endif
//
DEB_ON
#endif
//
DEB_ON
#endif
//
BASE_DEBCONFIG_HH_INCLUDED
#endif
//
BASE_DEBCONFIG_HH_INCLUDED
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