~thomas-voss/glmark2/build-for-mir

« back to all changes in this revision

Viewing changes to src/log.cpp

  • Committer: Package Import Robot
  • Author(s): Alexandros Frantzis
  • Date: 2011-09-22 11:32:17 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: package-import@ubuntu.com-20110922113217-wvok1qgruexari8d
Tags: 2011.09-0ubuntu1
* New upstream release 2011.09.
* debian/control:
  - Start the description of the glmark2-data package with
    a lowercase letter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "options.h"
28
28
#include "log.h"
29
29
 
 
30
#ifdef ANDROID
 
31
#include <android/log.h>
 
32
#endif
 
33
 
 
34
#ifndef ANDROID
30
35
void
31
36
Log::info(const char *fmt, ...)
32
37
{
62
67
    fflush(stdout);
63
68
    fflush(stderr);
64
69
}
 
70
#else
 
71
void
 
72
Log::info(const char *fmt, ...)
 
73
{
 
74
    va_list ap;
 
75
    va_start(ap, fmt);
 
76
    __android_log_vprint(ANDROID_LOG_INFO, "glmark2", fmt, ap);
 
77
    va_end(ap);
 
78
}
 
79
 
 
80
void
 
81
Log::debug(const char *fmt, ...)
 
82
{
 
83
    if (!Options::show_debug)
 
84
        return;
 
85
    va_list ap;
 
86
    va_start(ap, fmt);
 
87
    __android_log_vprint(ANDROID_LOG_DEBUG, "glmark2", fmt, ap);
 
88
    va_end(ap);
 
89
}
 
90
 
 
91
void
 
92
Log::error(const char *fmt, ...)
 
93
{
 
94
    va_list ap;
 
95
    va_start(ap, fmt);
 
96
    __android_log_vprint(ANDROID_LOG_ERROR, "glmark2", fmt, ap);
 
97
    va_end(ap);
 
98
}
 
99
 
 
100
void
 
101
Log::flush()
 
102
{
 
103
}
 
104
 
 
105
#endif