aboutsummaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/logger.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 8c058d1..fe6a916 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -12,7 +12,7 @@ Bu::Logger::~Logger()
12{ 12{
13} 13}
14 14
15void Bu::Logger::log( int nLevel, const char *sFile, const char *sFunction, int nLine, const char *sFormat, ...) 15void Bu::Logger::log( uint32_t nLevel, const char *sFile, const char *sFunction, int nLine, const char *sFormat, ...)
16{ 16{
17 if( (nLevel&nLevelMask) == 0 ) 17 if( (nLevel&nLevelMask) == 0 )
18 return; 18 return;
@@ -112,12 +112,17 @@ void Bu::Logger::setFormat( const Bu::FString &str )
112 //write( fileno(stdout), sLogFormat.getStr(), sLogFormat.getSize() ); 112 //write( fileno(stdout), sLogFormat.getStr(), sLogFormat.getSize() );
113} 113}
114 114
115void Bu::Logger::setMask( int n ) 115void Bu::Logger::setMask( uint32_t n )
116{ 116{
117 nLevelMask = n; 117 nLevelMask = n;
118} 118}
119 119
120void Bu::Logger::setLevel( int n ) 120uint32_t Bu::Logger::getMask()
121{
122 return nLevelMask;
123}
124
125void Bu::Logger::setLevel( uint32_t n )
121{ 126{
122 int j; 127 int j;
123 for( j = 31; j > 0; j-- ) 128 for( j = 31; j > 0; j-- )
@@ -134,8 +139,8 @@ void Bu::Logger::setLevel( int n )
134 } 139 }
135} 140}
136 141
137void Bu::Logger::hexDump( int nLevel, const char *sFile, const char *sFunction, 142void Bu::Logger::hexDump( uint32_t nLevel, const char *sFile,
138 int nLine, const void *pDataV, long nDataLen, 143 const char *sFunction, int nLine, const void *pDataV, long nDataLen,
139 const char *lpName ) 144 const char *lpName )
140{ 145{
141 log( nLevel, sFile, sFunction, nLine, "Displaying %ld bytes of %s.", nDataLen, lpName ); 146 log( nLevel, sFile, sFunction, nLine, "Displaying %ld bytes of %s.", nDataLen, lpName );
@@ -176,3 +181,4 @@ void Bu::Logger::hexDump( int nLevel, const char *sFile, const char *sFunction,
176 } 181 }
177 log( nLevel, sFile, sFunction, nLine, sBorder.getStr() ); 182 log( nLevel, sFile, sFunction, nLine, sBorder.getStr() );
178} 183}
184