1 # This file is part of NIT (http://www.nitlanguage.org).
3 # Copyright 2014 Alexis Laferrière <alexis.laf@xymus.net>
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Advanced Android logging services
23 #include <android/log.h>
26 # Default Android log priority
27 protected fun priority_default
: Int do return 1
29 # Verbose Android log priority
30 protected fun priority_verbose
: Int do return 2
32 # Debug Android log priority
33 protected fun priority_debug
: Int do return 3
35 # Info Android log priority
36 protected fun priority_info
: Int do return 4
38 # Warn Android log priority
39 protected fun priority_warn
: Int do return 5
41 # Error Android log priority
42 protected fun priority_error
: Int do return 6
44 # Fatal Android log priority
45 protected fun priority_fatal
: Int do return 7
47 # Silent Android log priority
48 protected fun priority_silent
: Int do return 8
50 # Write `text` to Android log at priority `level` with tag `tag`
51 protected fun log_write
(level
: Int, tag
, text
: NativeString) `{
52 __android_log_write(level, tag, text);