~libmatrix-dev/libmatrix/trunk

« back to all changes in this revision

Viewing changes to log.cc

  • Committer: Jesse Barker
  • Date: 2012-01-27 21:40:46 UTC
  • Revision ID: jesse.barker@linaro.org-20120127214046-6mnnp7kmvihbkfez
Make appname a required parameter to Log::init and make it private as nothing public needs direct access

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
using std::string;
25
25
 
26
26
const string Log::continuation_prefix("\x10");
27
 
string Log::appname;
 
27
string Log::appname_;
28
28
bool Log::do_debug_(false);
29
29
 
30
30
#ifndef ANDROID
146
146
{
147
147
    va_list ap;
148
148
    va_start(ap, fmt);
149
 
    __android_log_vprint(ANDROID_LOG_INFO, appname.c_str(), fmt, ap);
 
149
    __android_log_vprint(ANDROID_LOG_INFO, appname_.c_str(), fmt, ap);
150
150
    va_end(ap);
151
151
}
152
152
 
157
157
        return;
158
158
    va_list ap;
159
159
    va_start(ap, fmt);
160
 
    __android_log_vprint(ANDROID_LOG_DEBUG, appname.c_str(), fmt, ap);
 
160
    __android_log_vprint(ANDROID_LOG_DEBUG, appname_.c_str(), fmt, ap);
161
161
    va_end(ap);
162
162
}
163
163
 
166
166
{
167
167
    va_list ap;
168
168
    va_start(ap, fmt);
169
 
    __android_log_vprint(ANDROID_LOG_ERROR, appname.c_str(), fmt, ap);
 
169
    __android_log_vprint(ANDROID_LOG_ERROR, appname_.c_str(), fmt, ap);
170
170
    va_end(ap);
171
171
}
172
172