Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
00adbc78
There was an error fetching the commit references. Please try again later.
Commit
00adbc78
authored
10 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
log: updated MAX_LOGLEVEL to use correct log level enum type
parent
5cd922d1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/common/log.h
+3
-3
3 additions, 3 deletions
src/common/log.h
src/common/log_manager.cpp
+1
-1
1 addition, 1 deletion
src/common/log_manager.cpp
src/common/log_manager.h
+1
-1
1 addition, 1 deletion
src/common/log_manager.h
with
5 additions
and
5 deletions
src/common/log.h
+
3
−
3
View file @
00adbc78
...
...
@@ -94,10 +94,10 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, const char*file, int
;
#if defined LOGGING || defined _DEBUG || defined DEBUGFAST
#define MAX_LOGLEVEL DEBUG
_LEVEL
#define MAX_LOGLEVEL
L
DEBUG
#else
#ifndef MAX_LOGLEVEL
#define MAX_LOGLEVEL WARNING
_LEVEL
#define MAX_LOGLEVEL
L
WARNING
#endif // loglevel
#endif // logging
...
...
@@ -109,7 +109,7 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, const char*file, int
// Let the compiler optimize this out
#define GENERIC_LOG(t, v, ...) { \
if (v <= MAX_LOGLEVEL) \
if (v <=
LogTypes::
MAX_LOGLEVEL) \
GenericLog(v, t, __FILE__, __LINE__, __func__, __VA_ARGS__); \
}
...
...
This diff is collapsed.
Click to expand it.
src/common/log_manager.cpp
+
1
−
1
View file @
00adbc78
...
...
@@ -149,7 +149,7 @@ LogContainer::LogContainer(const char* shortName, const char* fullName, bool ena
{
strncpy
(
m_fullName
,
fullName
,
128
);
strncpy
(
m_shortName
,
shortName
,
32
);
m_level
=
(
LogTypes
::
LOG_LEVELS
)
MAX_LOGLEVEL
;
m_level
=
LogTypes
::
MAX_LOGLEVEL
;
}
// LogContainer
...
...
This diff is collapsed.
Click to expand it.
src/common/log_manager.h
+
1
−
1
View file @
00adbc78
...
...
@@ -97,7 +97,7 @@ private:
~
LogManager
();
public:
static
u32
GetMaxLevel
()
{
return
MAX_LOGLEVEL
;
}
static
u32
GetMaxLevel
()
{
return
LogTypes
::
MAX_LOGLEVEL
;
}
void
Log
(
LogTypes
::
LOG_LEVELS
level
,
LogTypes
::
LOG_TYPE
type
,
const
char
*
file
,
int
line
,
const
char
*
function
,
const
char
*
fmt
,
va_list
args
);
...
...
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