This file is indexed.

/usr/share/lua/5.1/lgi/log.lua is in lua-lgi 0.6.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
------------------------------------------------------------------------------
--
--  LGI support for GLib-based logging.
--
--  Copyright (c) 2011 Pavel Holejsovsky
--  Licensed under the MIT license:
--  http://www.opensource.org/licenses/mit-license.php
--
------------------------------------------------------------------------------

local pcall, ipairs = pcall, ipairs
local string = require 'string'
local core = require 'lgi.core'

local log = {}

-- Creates table containing methods 'message', 'warning', 'critical', 'error',
-- 'debug' methods which log to specified domain.
function log.domain(name)
   local domain = log[name] or {}
   for _, level in ipairs { 'message', 'warning', 'critical',
			    'error', 'debug' } do
      if not domain[level] then
	 domain[level] =
	    function(format, ...)
	       local ok, msg = pcall(string.format, format, ...)
	       if not ok then
		  msg = ("BAD FMT: `%s', `%s'"):format(format, msg)
	       end
	       core.log(name, level:upper(), msg)
	    end
      end
   end
   log[name] = domain
   return domain
end

return log