@@ -16,32 +16,34 @@ enum dbg_lvl_t : uint32_t {
1616 ALL = UINT32_MAX
1717};
1818
19- enum TLogLevel {logINFO, logTRACE};
20- static TLogLevel LogReportingLevel = getenv(" LIBSASS_TRACE" ) ? logTRACE : logINFO;
21- class Log
22- {
23- public:
24- Log ();
25- virtual ~Log ();
26- std::ostringstream& Get (TLogLevel level, void *p, const char *f, const char *filen, int lineno);
27- std::ostringstream& Get (TLogLevel level, const char *f, const char *filen, int lineno);
28- public:
29- protected:
30- std::ostringstream os;
31- private:
32- Log (const Log&);
33- Log& operator =(const Log&);
34- private:
35- TLogLevel messageLevel;
36- };
19+ namespace Sass {
20+ enum TLogLevel {logINFO, logTRACE};
21+ static TLogLevel LibsassLogReportingLevel = getenv(" LIBSASS_TRACE" ) ? logTRACE : logINFO;
22+ class Log
23+ {
24+ public:
25+ Log ();
26+ virtual ~Log ();
27+ std::ostringstream& Get (TLogLevel level, void *p, const char *f, const char *filen, int lineno);
28+ std::ostringstream& Get (TLogLevel level, const char *f, const char *filen, int lineno);
29+ public:
30+ protected:
31+ std::ostringstream os;
32+ private:
33+ Log (const Log&);
34+ Log& operator =(const Log&);
35+ private:
36+ TLogLevel messageLevel;
37+ };
38+ }
3739
3840#define TRACE () \
39- if (logTRACE > LogReportingLevel ) ; \
40- else Log().Get(logTRACE, __func__, __FILE__, __LINE__)
41+ if (logTRACE > Sass::LibsassLogReportingLevel ) ; \
42+ else Sass:: Log().Get(Sass:: logTRACE, __func__, __FILE__, __LINE__)
4143
4244#define TRACEINST (obj ) \
43- if (logTRACE > LogReportingLevel ) ; \
44- else Log().Get(logTRACE, (obj), __func__, __FILE__, __LINE__)
45+ if (logTRACE > Sass::LibsassLogReportingLevel ) ; \
46+ else Sass:: Log().Get(Sass:: logTRACE, (obj), __func__, __FILE__, __LINE__)
4547
4648#ifdef DEBUG
4749
0 commit comments