blob: 0867e31e363f9fc5eeeed610c9c293bf78d8fbc5 [file] [log] [blame]
xf.lif1aed282024-02-06 00:31:51 -08001/*
2 * Copyright 2011 Daniel Drown
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * logging.h - print a log message
17 */
18
19#ifndef __LOGGING_H__
20#define __LOGGING_H__
21// for the priorities
22//#include <android/log.h>
23
24/**
25 * Android log priority values, in increasing order of priority.
26 */
27typedef enum android_LogPriority {
28 /** For internal use only. */
29 ANDROID_LOG_UNKNOWN = 0,
30 /** The default priority, for internal use only. */
31 ANDROID_LOG_DEFAULT, /* only for SetMinPriority() */
32 /** Verbose logging. Should typically be disabled for a release apk. */
33 ANDROID_LOG_VERBOSE,
34 /** Debug logging. Should typically be disabled for a release apk. */
35 ANDROID_LOG_DEBUG,
36 /** Informational logging. Should typically be disabled for a release apk. */
37 ANDROID_LOG_INFO,
38 /** Warning logging. For use with recoverable failures. */
39 ANDROID_LOG_WARN,
40 /** Error logging. For use with unrecoverable failures. */
41 ANDROID_LOG_ERROR,
42 /** Fatal logging. For use when aborting. */
43 ANDROID_LOG_FATAL,
44 /** For internal use only. */
45 ANDROID_LOG_SILENT, /* only for SetMinPriority(); must be last */
46} android_LogPriority;
47
48void logmsg(int prio, const char *fmt, ...);
49void logmsg_dbg(int prio, const char *fmt, ...);
50
51#endif